Answers for "laravel get single column value"

PHP
3

get single column value in laravel eloquent

Vehicle::find(3)->value('register_number');
Posted by: Guest on September-23-2020
2

laravel get single column value

$items = DB::table('items')
             ->select('id', 'ref_code', 'name', 'price')
             ->where('ref_code','=', $request->ref_code)
             ->first();
Posted by: Guest on October-04-2020
0

laravel eloquent get one column value

ModelName::find(id)->value('column_name');
Posted by: Guest on June-20-2021

Code answers related to "laravel get single column value"

Browse Popular Code Answers by Language