Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel find query

// Retrieve a model by its primary key...
$flight = AppModelsFlight::find(1);

// Retrieve the first model matching the query constraints...
$flight = AppModelsFlight::where('active', 1)->first();

// Shorthand for retrieving the first model matching the query constraints...
$flight = AppModelsFlight::firstWhere('active', 1);
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #find #query
ADD COMMENT
Topic
Name
7+5 =