Route::group(['middleware' => 'web'], function () {
Route::any('session1',['uses'=>'StudentController@session1']);
Route::any('session2',['uses'=>'StudentController@session2']);
});
Route::any('student/response',['uses'=>'StudentController@response']);
无法通过response'重定向访问session2
Route::any('session1',['uses'=>'StudentController@session1']);
Route::any('session2',['uses'=>'StudentController@session2']);
});
Route::any('student/response',['uses'=>'StudentController@response']);
无法通过response'重定向访问session2
2017-11-22
使用中间件后路由无法访问BadMethodCallException
Method get does not exist.
Method get does not exist.
2017-11-17
报TokenMismatchException错误,要加一条input语句这条语句为<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
2017-11-12
科普一下:往Session内存json数据
先准备好Json数据,转换成数组就可以添加进去了
Session::put(json_decode('{"a":1,"b":2,"c":3,"d":4,"e":5}',JSON_FORCE_OBJECT))
虽然这样有点多此一举的感觉,但有这个方法总比没有的好吧……
先准备好Json数据,转换成数组就可以添加进去了
Session::put(json_decode('{"a":1,"b":2,"c":3,"d":4,"e":5}',JSON_FORCE_OBJECT))
虽然这样有点多此一举的感觉,但有这个方法总比没有的好吧……
2017-11-09