科普一下:往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
dd( isset($student->sex) ); 在你的框架打印就不報錯 在自己框架打印就報 LogicException in Model.php line 2723:
Relationship method must return an object of type Illuminate\Database\Eloquent\Relations\Relation
Relationship method must return an object of type Illuminate\Database\Eloquent\Relations\Relation
2017-11-08
最新回答 / weibo_啊哈小明_0
我剛發現了個問題,如果時間那一列按老師的那樣{{date('Y-m-d',$student->created_at)}}打就報這個錯誤,但如果我只是打{{$student->created_at}}就正常顯示了
2017-11-06
ReflectionException in Container.php line 737: Class web does not exist
2017-11-03
public function handle($request, Closure $next)
{
//請求
$response = $next($request);
//邏輯
echo '邏輯單元';
return $response;
}
//最后需要有return,邏輯操作在 [return]前 && [請求]后.
{
//請求
$response = $next($request);
//邏輯
echo '邏輯單元';
return $response;
}
//最后需要有return,邏輯操作在 [return]前 && [請求]后.
2017-11-02
@gravility 這是習慣問題,因為這樣寫的話,在寫別名(或者其他)的時候,直接在里面加,不會忘,也不會錯了。
2017-11-02
在程序頭寫入以下語句:
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Session;
2017-11-01
FatalErrorException in Container.php line 1074:
Maximum function nesting level of '100' reached, aborting!
in Container.php line 1074
求大神幫我看下這是什么錯誤
Maximum function nesting level of '100' reached, aborting!
in Container.php line 1074
求大神幫我看下這是什么錯誤
2017-10-24