laravel json where code example
Example 1: laravel query json
$users = DB::table('users')
->whereJsonContains('options->languages', ['en', 'de'])
->get();
Example 2: laravel json eloquent
protected $casts = [
'birthday' => 'date:Y-m-d',
'joined_at' => 'datetime:Y-m-d H:00',
];