eloquent update record code example
Example 1: update query in laravel eloquent
$data = DB::table('cart')
->where('crt_id', $id)
->update(['crt_status' =>'0']);
Example 2: laravel find query
<?php
$flights = App\Models\Flight::all();
foreach ($flights as $flight) {
echo $flight->name;
}
Example 3: laravel find query
foreach ($flights as $flight) {
echo $flight->name;
}