What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-01-29 03:50:15
larave Soft Deletes
// Retrieve flight by name, or create it if it doesn't exist... $flight = App\Flight::firstOrCreate(['name' => 'Flight 10']); // Retrieve flight by name, or create it with the name, delayed, and arrival_time attributes... $flight = App\Flight::firstOr... Add solution -
PHP 2021-09-18 02:04:03
laravel firstorcreate
// Retrieve flight by name, or create it if it doesn't exist... $flight = App\Flight::firstOrCreate(['name' => 'Flight 10']); // Retrieve flight by name, or create it with the name, delayed, and arrival_time attributes... $flight = App\Flight::firstOr... Add solution -
PHP 2021-09-10 09:57:03
create if not exist laravel
Occasionally, you may need to update an existing model or create a new model if no matching model exists. Like the firstOrCreate method, the updateOrCreate method persists the model, so there is no need to manually call the save method. In the example b... Add solution -
Other 2021-09-08 18:11:01
laravel create default admin user
Add to the .env file: ADMIN_NAME="John Doe" [email protected] ADMIN_PASSWORD=secure_pa55word Add to the .env.example file: ADMIN_NAME= ADMIN_EMAIL= ADMIN_PASSWORD= Create 'admin.php' inside the \config\ folder and paste... Add solution
Best helpers
Ranking is empty