【发布时间】:2018-02-24 05:08:20
【问题描述】:
你好朋友感谢查看我的问题!!
我无法激活我的菜单链接
我的查看文件代码
<div class="sign-up-right">
<a href="{{ URL::route('singup') }}">Sign Up</a>
</div>
我的控制器文件(MyCon.php)
public function singup(){
return View::make('preview',['preview'=>'signup.php']);
}
我的路线文件代码
Route::get('/', 'MyCon@index');
route::get('admin', array('user'=>'Admin@index'));
Route::get('/login',function(){ return View::make('preview',['preview'=>'login.php']);});
Route::get('singup', ['as' => 'signup', 'uses' => 'MyCon@signup']);
但是当我点击注册链接时,它会显示错误
Symfony \ Component \ HttpKernel \ Exception \ MethodNotAllowedHttpException
return new Response('', 200, array('Allow' => implode(',', $others)));
}))->bind($request);
}
$this->methodNotAllowed($others);
}
protected function methodNotAllowed(array $others)
{
throw new MethodNotAllowedHttpException($others);
}
protected function check(array $routes, $request, $includingMethod = true)
请帮助我的链接成功 谢谢
【问题讨论】:
-
不相关,但您到处都拼错了“注册”。 EDIT** 实际上它可能是相关的,因为你拼写正确,而其他所有尝试都错误。
-
您发布的函数不完整,因此很难真正确定问题所在,但是拼写不一致和格式不佳会导致很多问题。让代码变得漂亮是值得的。你会明白为什么。
标签: php laravel laravel-5 laravel-4