Hello guys,
in the official doc of Eloquent for Laravel, this is the way to make an update to a table :
$flight = App\Flight::find(1);
$flight->name = 'New Flight Name';
$flight->save();
I must say, I don't really understand that. For me, it means that for a very basic update, there will be 2 queries to the database - a select and THEN an update ?
Anyone could explain me why this would be a good solution ?
Thanks !
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1RlMf7U
via IFTTT
Aucun commentaire:
Enregistrer un commentaire