Artisan is "command line interface" using in Laravel. It provides lots of helpful commands for you while developing your application. We can run these command according to our need.
php artisan --version
php artisan list;
php artisan help;
php artisan down;
php artisan up;For creating controller
php artisan make:controller ControllerName ;For creating resource controller (CRUD operation)
php artisan make:controller HomeController--resourceThis controller generate only 5 methods: index(), store(), show(), update(), destroy(). Because create/edit forms are not needed for API
php artisan make:controller HomeController--apiFor creating mail
php artisan make:mail;For creating model
php artisan make:model ModelNameFor creating model with migration
php artisan make:model usermodel -m ;To create a migration
php artisan make:migration MigrationNameTo rollback the migration.
php artisan migrate:rollbackTo create a middleware
php artisan make:middleware MiddelwareName;For create a auth
php artisan make:auth;For create a provider
php artisan make:provider ProviderNameTo create the symbolic link from public/storage to storage/app/public,
php artisan storage:linkFor Generates a new broadcasting channel class.
php artisan make:channel;For Create a new Artisan command
php artisan make:command CommandName ;For Create a new event class
php artisan make:event EventName;For Create a new custom exception class
php artisan make:exception ExceptionName;For Create a new model factory
php artisan make:factoryFor create a job class
php artisan make:jobFor create a job listener
php artisan make:listenerFor create a notification class
php artisan make:notificationFor create a new validation rule
php artisan make:ruleFor Create a new form request class
php artisan make:requestFor create a new seeder class
php artisan make:seeder SeederNameFor create a new test class
php artisan make:testFor create a new Artisan command.
php artisan make:command
php artisan config:clear
php artisan cache:clear
php artisan view:clear
php artisan route:clearComposer -regenerates the list of all classes that need to be included in the project
composer dump-autoloadSchedule a Command- Runs the scheduled commands defined in the application.
php artisan schedule:runRun a Command Silently - Executes a command without outputting any messages.
php artisan command:name --quietCreate a New Command with Options -Creates a new command with a specified command name.
php artisan make:command CommandName --command=custom:command
We are Recommending you:
- How to use soft delete in Laravel?
- Laravel remove public from url
- How to generate dynamic real time sitemap.xml file in Laravel 8
- Laravel 7 multi auth login
- Custom 404 Page In Laravel 8
- Laravel's .htaccess to remove "public" from URL
- Laravel 8/7 Overwriting the Default Pagination System
- Why Use the Repository Pattern in a Laravel Application
- Integrate Zoho SMTP Mail Configurations in Laravel?
Step Out of Your Comfort Zone: 10 Powerful...
Is Mobile Reels Harming Our Children? Here's...
Simple body language tricks1. Stand with...
Best Free Websites to Learn CodingIf you...
When We talk about Linux commands, what we...
You can create your custom 404 page...
DIY: Make a Tote Bag from Old Clothes!Do you...
Simple body language tricks1. Stand with...
In this tutorial, I would like to share with...