已采納回答 / zhang_yuan_java
因?yàn)?student是一個(gè)在控制器中得到的實(shí)例對象,這個(gè)示例可以調(diào)用模型中的這些方法。而且模型中的這些方法,在控制器中的實(shí)例中,可以通過->with(['sex']),這樣的方法調(diào)用。在后期開發(fā)中經(jīng)常這樣調(diào)用。
2017-01-07
這個(gè)request 要 use Illuminate\Http\Request;老師的咋不需要?
2017-01-06
建議不熟悉 中間件 的來看一下這里的資料學(xué)習(xí)一下
https://laravel-china.org/topics/687
講師似乎忘了給講這個(gè)東西了,在這節(jié)課程里剛開始就操作中間件可能會把人搞得一頭霧水...
https://laravel-china.org/topics/687
講師似乎忘了給講這個(gè)東西了,在這節(jié)課程里剛開始就操作中間件可能會把人搞得一頭霧水...
2017-01-06
在StudentController.php 里加上 use Session; 就可以解決Class 'App\Http\Controllers\Session' not found的問題了,親測有效!
2017-01-05
To use the class from the global namespace, place:
use Session;
on top of your controller, after your namespace declaration
Alternatively, you can call the class from the global namespace with:
\Session::get('panier');
use Session;
on top of your controller, after your namespace declaration
Alternatively, you can call the class from the global namespace with:
\Session::get('panier');
2017-01-05
老師講的不細(xì)致啊,一些東西沒有提到,但是會報(bào)錯(cuò)
2017-01-03
最新回答 / 慕粉3413248
解決了,在上面使用foreach的時(shí)候@foreach($student as $student)這樣寫竟然會跟下面$student產(chǎn)生沖突,在foreach時(shí)@foreach($student as $val)就沒事了,,不懂背后原理。。。
2016-12-30