Laravel 错误异常路由未定义
我正在开始一个新项目 laravel make, 由两页我创建目录中的页面组成
, 这是我的文件
:
我可以通过单击浏览器中的链接以及运行时访问注册页面 artisan routes, 他向我展示了我创建的路线。
在
, 当我添加字符串时
并重新启动页面我有此错误
我怎么解决这个问题?
app/view
, 这是我的文件
route.php
:
Route::get/'/', function//
{
return View::make/'hello'/;
}/;
Route::get/'welcome', function//
{
return View::make/'welcome'/;
}/;
Route::any/'signup', function//
{
return View::make/'signup'/;
}/;
我可以通过单击浏览器中的链接以及运行时访问注册页面 artisan routes, 他向我展示了我创建的路线。
在
welcome.blade.php
, 当我添加字符串时
{{link_to_route/'signup'/}}
并重新启动页面我有此错误
ErrorException
Route [signup] not defined. /View: C:\wamp\www\atot\app\views\welcome.blade.php/
我怎么解决这个问题?
没有找到相关结果
已邀请:
3 个回复
龙天
赞同来自:
你的问题是你没有使用命名的路线。
如果您愿意,您可以在此阅读更多信息:
http://laravel.com/docs/routing#named-routes
窦买办
赞同来自:
http://laravel.com/docs/routing#named-routes
, 因此,要使它起作用,可以调用每个路线,然后它将工作
在更新中 routes.php 下一个
然后,您可以生成以下路由:
莫问
赞同来自:
或使用名称声明路由
http://laravel.com/docs/helpers
它仅适用于名称的路由,该路由接受第一个参数中的路由名称。