最贊回答 / qq_殘橋斷雪_0
沒有發現路由,估計你在頁面使用的url()方法,這樣只能簡單的生成XXX/id=XXX,推薦使用URL::action(),方法,這樣第二個參數會表示成XXX?id=XXX,這種方式不需要修改路由,也不需要在方法中額外添加一個參數,而是使用Request對象來獲取
2016-10-19
調用Session:put()的時候提示 App\Http\Controllers\Session' not found
我是5.3版本
我是5.3版本
2016-10-15
最贊回答 / 傾城一笑stu
解決了,要在表單域里加? ?<input type="hidden" name="_token" value="{{csrf_token()}}"/> 原因是:laravel 默認開啟了 csrf驗證 ,不是get請求的話需要驗證csrf,因此在表單里需要加個隱藏域 ?
2016-10-12
使用 {{ Request::getPathInfo()=='student/create'?'active':''}}不起作用時應該用
{{ Request::getPathInfo()=='/student/create'?'active':''}} 多一個 /
{{ Request::getPathInfo()=='/student/create'?'active':''}} 多一個 /
2016-10-12