Skip to main content

Posts

Showing posts with the label Artisan Commands

Laravel Tips & Tricks Every Fresher Should Know

Laravel Tips & Tricks Every Fresher Should Know Laravel is one of the most beginner-friendly yet powerful PHP frameworks. If you’re just starting your Laravel journey, here are some practical tips and tricks that will make your development process smoother, cleaner, and more professional. 1. Setup & Environment Always configure your .env file correctly. Keep secrets (like DB passwords, API keys) out of version control. Use php artisan config:cache in production for performance. composer create-project laravel/laravel my-app cd my-app php artisan key:generate 💡 Pro Tip: Don’t forget to ignore .env in git and use .env.example instead. 2. Master Artisan Artisan is Laravel’s command line tool that saves time and reduces repetitive work. php artisan list — list all commands php artisan make:controller PostController --resource — generate resourceful controller php artisan route...

50 Artisan Commands Every Developer Should Know

50 Artisan Commands Every Developer Should Know in Laravel Published on: July 15, 2025   |   Author: Rana Saha Laravel Artisan is a powerful command-line tool that helps developers manage their applications with ease. From generating files to running tests, Artisan commands save time and reduce repetitive work. In this blog, we’ll explore the top 50 Artisan commands every Laravel developer should know. 📁 Project & Environment php artisan serve – Run Laravel development server. php artisan config:cache – Cache the configuration files. php artisan config:clear – Clear the config cache. php artisan cache:clear – Clear the application cache. php artisan route:cache – Cache the route definitions. php artisan route:clear – Remove the route cache. php artisan view:clear – Clear compiled view files. php artisan optimize – Optimize the framework for better performance. 🧱 Migrations & D...