#artisan#php

Puts your application in maintenance mode and serves a 503 holding page.

php artisan down
copy
#artisan#php

Turns off the maintenance mode and puts your application back online.

php artisan up
copy
#artisan#php#cache

Cache configuration file for faster loading.

php artisan config:cache
copy
#artisan#php#cache

Flush the application cache.

php artisan cache:clear
copy
#artisan#php#cache

Clears configuration file cache.

php artisan config:clear
copy
#artisan#php#db

Seeds the database with records.

php artisan db:seed
copy
#artisan#php

Show the information about a command.

php artisan help [command]
copy
#artisan#php

Check version of the installed Laravel instance.

php artisan --version
copy
#artisan#php

Print a full list of Artisan commands with descriptions.

php artisan
copy
#artisan#php#route

This artisan command will list all routes registered in your application.

php artisan route:list
copy
#artisan#php

Puts the application into maintenance mode.

php artisan down
copy
#artisan#php#make#auth

Depending on Laravel version installed you can add auth functionality to your app using the following commands. Make sure you have a database configured and connected for this step as it will be needed to create a user table.

// Laravel version < 6
php artisan make:auth

// Laravel verions >= 6
composer require laravel/ui
php artisan ui vue --auth
php artisan migrate
copy
#artisan#php#make#controller

Creates a new Controller class. Naming convention - use a plural form of the element i.e. "Items" followed by the "Controller".

php artisan make:controller ItemsController
copy
#artisan#php#make#controller

Creates a new Controller class. "-r" flag creates all default route actions in the new Controller - index, show, create, store, edit, update and destroy. "-m" flag will create the Model file too.

php artisan make:controller ItemsController -r -m
copy
#artisan#php#make#event

Creates a new Event class.

php artisan make:event ItemWasAdded
copy
#artisan#php#make#factory

Creates a new Factory class for a specified Model.

php artisan make:factory ItemFactory -m Item
copy
#artisan#php#make#listener

Creates a new Listener class. The --event flag, or -e in short, will include the event to listen for.

php artisan make:event SendItemAddedNotification --event=ItemAdded
copy
#artisan#php#make#mail

Creates a new Mail class. The --markdown flag, or -m in short, will also create a Markdown template for the new email.

php artisan make:mail ItemConfirmation --markdown="emails.item-confirmation"
copy
#artisan#php#make#migration

Creates a new migration class.

php artisan make:migration create_items_table
copy
#artisan#php#make#notification

Creates a new Notification class.

php artisan make:notification UserEmailUpdated
copy
#artisan#php#make#seeder

Creates a new Seeder class for a specified table.

php artisan make:seeder ItemsTableSeeder
copy
#artisan#php#migration

Runs all database migrations.

php artisan migrate
copy
#artisan#php#migration

Runs a clean database migration. WARNING! This command will wipe the database clean and rebuild all tables from scratch so it should never be run in the production application.

php artisan migrate:fresh
copy
#artisan#php#migration

Revert migration one step. By appending a --step=x flag you can define the number of steps to rollback by.

php artisan migrate:rollback
copy
#artisan#php

Serve command runs the development server for your Laravel project.

php artisan serve
copy
#artisan#php#tinker

Tinker allows you to interact with the Laravel project directly from the command line interface.

php artisan tinker
copy
#artisan#php

Puts the application into active mode.

php artisan up
copy
Sitemap Git repository