Engineering note · Laravel

Extend Existing Artisan Commands

By Published Updated

Laravel

Extend and customize built-in Laravel Artisan commands to suit specific requirements. This technique allows you to modify default behavior, add new functionality, and integrate seamlessly with your application.

CODE SAMPLE Code snippet
// Extend the default migrate:refresh command
namespace App\Console\Commands;

use Illuminate\Database\Console\Migrations\RefreshCommand;

class CustomRefreshCommand extends RefreshCommand
{
    // Customize or extend functionality as needed
}

More engineering notes

Reduce Template Size with Blade Includes

Description: Break down large Blade templates into smaller reusable components using @include direct...

Optimize Performance with Middleware

Use middleware to perform optimizations like caching responses, compressing output, or handling sess...