Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel find query

use AppModelsDestination;
use AppModelsFlight;

return Destination::addSelect(['last_flight' => Flight::select('name')
    ->whereColumn('destination_id', 'destinations.id')
    ->orderBy('arrived_at', 'desc')
    ->limit(1)
])->get();
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #find #query
ADD COMMENT
Topic
Name
3+1 =