Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel eloquent get first

// return first row by id
$user = AppUser::where('id',$id)->first();
// or return directly a field
$userId = AppUser::where(...)->pluck('id');
 
PREVIOUS NEXT
Tagged: #laravel #eloquent
ADD COMMENT
Topic
Name
4+7 =