I am using laravel v5.2
when I tried to make my table columns data type Json that cause an error because of MySQL version.
I read a solution about this I can make its type text and casting them in my model to the array like that
protected $casts = [
'division1' => 'array',
];
in my controller this my query
$devision= admin_panel::find(1);
when dd($devision->division1);
the result is null but when I removed the casting it return the result with no proplem
I tried this $devision= admin_panel::find(1)->toarray();
but also dd($devision['division1']); returns null