Answers for "Laravel JSON"

2

laravel json response

return response()->json([
    'name' => 'Abigail',
    'state' => 'CA',
]);
Posted by: Guest on October-01-2020
0

laravel query json

$users = DB::table('users')
                ->whereJsonContains('options->languages', ['en', 'de'])
                ->get();
Posted by: Guest on May-20-2020
1

Laravel json response

return response()->json($array);
Posted by: Guest on May-17-2021
0

Laravel JSON

public function getOrgById(Request $request){
    // do something here...
    return response()->json(array('foo' => 'bar'));
}
Posted by: Guest on July-23-2021
0

laravel json eloquent

protected $casts = [
    'birthday' => 'date:Y-m-d',
    'joined_at' => 'datetime:Y-m-d H:00',
];
Posted by: Guest on August-01-2020

Browse Popular Code Answers by Language