Answers for "search where query in laravel"

PHP
3

laravel eloquent search query 2020

$result = Marriage::where('name','LIKE','%'.$email_or_name.'%')
                ->orWhere('email','LIKE','%'.$email_or_name.'%')
                ->get();
Posted by: Guest on August-31-2020
0

laravel find query

use App\Models\Destination;
use App\Models\Flight;

return Destination::addSelect(['last_flight' => Flight::select('name')
    ->whereColumn('destination_id', 'destinations.id')
    ->orderBy('arrived_at', 'desc')
    ->limit(1)
])->get();
Posted by: Guest on October-08-2020

Browse Popular Code Answers by Language