對於我useController.php
頁我已創建three views inside a folder called users,and they are--
網址::以()用於獲取資源的途徑
1.index.blade 2.create.blade 3.store.blade
我有之外另一個form.blade的用戶文件夾,我要訪問的一個資源路線從我form.blade。但我連接到一個錨定標記的路徑與方法URL::to()
,它不產生適當route.And如果我嘗試點擊它向我發送的鏈接
禁止訪問,誤差403
如果我view source
的form.blade頁我看有沒有合適的URL是錨標記生成...
from.blade .PHP:
<span style='color:red'>Not signed up yet !!! </span><a href="{{URL::to('user/create')">register</a>
<h2 style='color:purple;'>login </h2>
{!!Form::open(array('url'=>'user')) !!}
{!!Form::label('name','Your name')!!}
{!!Form::text('name','',array('placeholder'=>'put your name here'))!!}
{!!Form::label('password','password')!!}
{!!Form::password('password')!!}
{!!Form::submit('Login')!!}
{!!Form::close()!!}
在附註中,我將查看[命名路線](https://laravel.com/docs/5.1/routing#named-routes)以用於將來'route('user.create') ' – Tomanow