LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

php-artisan

laravel framework's command line interface

TLDR

List commands
$ php artisan list
copy
Start development server
$ php artisan serve
copy
Run migrations
$ php artisan migrate
copy
Generate controller
$ php artisan make:controller [UserController]
copy
Generate model with migration
$ php artisan make:model [User] -m
copy
Clear cache
$ php artisan cache:clear
copy
Generate migration
$ php artisan make:migration [create_users_table]
copy
Rollback last migration
$ php artisan migrate:rollback
copy
List all routes
$ php artisan route:list
copy
Start interactive shell (tinker)
$ php artisan tinker
copy
Cache configuration
$ php artisan config:cache
copy

SYNOPSIS

php artisan command [options] [arguments]

DESCRIPTION

php artisan is the Laravel framework's command line interface. Provides commands for common development tasks like code generation, database migrations, caching, and server management.

PARAMETERS

serve

Start development server.
migrate
Run database migrations.
make:controller name
Generate controller.
make:model name
Generate model.
make:migration name
Generate migration.
cache:clear
Clear application cache.
config:cache
Cache configuration.
route:list
List all routes.
tinker
Start interactive shell.
queue:work
Start processing jobs on the queue.
schedule:run
Run the scheduled commands.
migrate:rollback
Rollback the last database migration.
migrate:fresh
Drop all tables and re-run all migrations.
make:middleware name
Generate middleware class.
make:seeder name
Generate database seeder class.
-v, -vv, -vvv
Increase verbosity of output.
--env ENV
The environment the command should run under.

SEE ALSO

php(1), composer(1), laravel(1)

Copied to clipboard
Kai