根据老师视频,写得代码!增删改查都能正常运行
https://github.com/CmderQ/laravel-learn
https://github.com/CmderQ/laravel-learn
2018-01-28
Session::put不行的原因是没有在上面加上 use Illuminate\Support\Facades\Session;
老师用的是phpstorm,比较智能会自动添加use的
ps:各位赶紧去换个phpstorm吧.....不然这种事情会经常发生的
老师用的是phpstorm,比较智能会自动添加use的
ps:各位赶紧去换个phpstorm吧.....不然这种事情会经常发生的
2018-01-16
/**
* 获取当前时间
*
* @return int
*/
public function freshTimestamp() {
return time();
}
/**
* 避免转换时间戳为时间字符串
*
* @param DateTime|int $value
* @return DateTime|int
*/
public function fromDateTime($value)
{
return $value;
}
* 获取当前时间
*
* @return int
*/
public function freshTimestamp() {
return time();
}
/**
* 避免转换时间戳为时间字符串
*
* @param DateTime|int $value
* @return DateTime|int
*/
public function fromDateTime($value)
{
return $value;
}
2018-01-14
update报错"Call to a member function format() on string"
2018-01-14
messageblade代码
@if(\Illuminate\Support\Facades\Session::has('success'))
<div class="alert alert-success alert-dismissible" role="alert">
省略
<strong>成功!</strong>{{\Illuminate\Support\Facades\Session::get()}}
</div>@endif
@if(\Illuminate\Support\Facades\Session::has('success'))
<div class="alert alert-success alert-dismissible" role="alert">
省略
<strong>成功!</strong>{{\Illuminate\Support\Facades\Session::get()}}
</div>@endif
2018-01-11