Php 未定义InvalidArgumentException路由[帐户激活]
这是我的route.php,我还提供了激活帐户的链接。然后也是“无效辩论例外” 未定义路由[帐户激活]。“此错误即将发生:Php 未定义InvalidArgumentException路由[帐户激活],php,laravel,Php,Laravel,这是我的route.php,我还提供了激活帐户的链接。然后也是“无效辩论例外” 未定义路由[帐户激活]。“此错误即将发生: <?php Route::get('/',array( 'as'=>'home', 'uses'=>'HomeController@home' )); //unauthenticated grp Route::group(array('before'=>'guest'), function() { //cross side
<?php
Route::get('/',array(
'as'=>'home',
'uses'=>'HomeController@home'
));
//unauthenticated grp
Route::group(array('before'=>'guest'), function() {
//cross side request forgery protection
Route::group(array('before'=>'csrf'), function() {
//create acc(POST)
Route::post('/account/create',array(
'as'=>'account-create-post',
'uses'=>'AccountController@postCreate'
));
});
//create acc(GET)
Route::get('/account/create',array(
'as'=>'account-create',
'uses'=>'AccountController@getCreate'
));
});
您需要将路由添加到routes.php文件(位于app/)中,以定义用于在电子邮件中创建链接的“帐户激活”路由
如果将处理该请求的函数位于AccountController中,并且称为getAccountActivate,则路由声明如下所示:
Route::get('/whateverUrlYouWant', [
'as' => 'account-activate',
'uses' => 'AccountController@getAccountActivate',
]);
您可以使用任何URL、控制器和函数。将您希望与该路由关联的URL放入。发布您的路由文件。我已经发布了my route.php