Laravel commands
- Posted on
- Laravel
- By Deepak Talwar
Laravel commands
Laravel Core commands

Core Commands
PHP artisan make:model [ModelName]
Create a database table model class. Models use to interact with products, people, and orders in databases.
PHP artisan make:controller [ControllerName]
Create a controller class. Use controllers to handle user input and logins and profile updates.
PHP artisan make:request [RequestName]
Create a form-request validation class. Validate user registration input using concise, reusable form validation logic.
Core Commands save you from writing boilerplate code by setting up your application's major components:
Migration Commands
php artisan migrate
Apply all pending migrations to update database schema. Create database modifications, such as adding tables or altering columns, without manually writing SQL .
php artisan migrate:fresh
Drop all tables and retry migrations.In development, reset your database to start over with testing or schema rebuilding.
php artisan db:seed
Database seeders add sample data to tables. Create sample users or goods to test in your database.
php artisan migrate:rollback
Remove a freshly formed table during testing to undo database schema changes.
php artisan migrate --path=database/migrations/0001_01_01_000001_create_cache_table.php
Run Specific Migration / file
php artisan make:model Tutorial_Groups --migration
Create Model class along with migration class file