Skip to content

Laravel

create project

composer create-project laravel/laravel [PROJ_NAME]

run project: php -S localhost:8000 -t [DIR_NAME]

Usually, dir name should be the public directory (for webroot).

Migration

create migration checkpoint: php artisan make:migration MIGRATION_NAME

apply migration: php artisan migrate

dry-run (show all changes but not apply): php artisan migrate --pretend

Redo all migrations: php artisan migrate:refresh

Dev env

Valet

uninstall: https://stackoverflow.com/questions/40276967/uninstall-laravel-valet

Ref: