我是 laravel 的新手,只是尝试了一些例子。这是:
laravel-master\app\controllers\account.php -
class AccountController extends BaseController
{
public function action_index()
{
echo "This is the profile page.";
}
public function action_login()
{
echo "This is the login form.";
}
public function action_logout()
{
echo "This is the logout action.";
}
}
然后我在 -laravel-master\app\routes.php
Route::controller('account');
所以我什么时候去主页
- myproject/account/login 它应该显示“这是登录表单”。.
但它的表现
Missing argument 2 for Illuminate\Routing\Router::controller(), called in C:\Program Files\Zend\Apache2\htdocs\laravel-master\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 177 and defined
.
不知道是什么问题。我在某个地方错了吗?