Answers for "laravel get where model"

PHP
4

laravel update

$flight = App\Models\Flight::find(1);

$flight->name = 'New Flight Name';

$flight->save();
Posted by: Guest on September-25-2020
0

laravel find query

foreach ($flights as $flight) {
    echo $flight->name;
}
Posted by: Guest on October-08-2020

Browse Popular Code Answers by Language