[{"data":1,"prerenderedAt":96},["ShallowReactive",2],{"blog-tech-laravel":3},[4,26,41,56,70,83],{"id":5,"slug":6,"title":7,"subtitle":8,"shortDescription":9,"description":10,"featureImage":11,"category":12,"tags":13,"author":18,"publishedDate":19,"featured":20,"relatedPosts":21,"tech":25},1,"laravel-12-new-features","What's New in Laravel 12: Complete Guide","Explore all the exciting features and improvements in Laravel 12","Laravel 12 brings significant improvements including better performance, new Artisan commands, and enhanced security features.","Laravel 12 represents a major milestone in the framework's evolution. This release focuses on developer experience, performance optimizations, and introduces several groundbreaking features that will change how we build web applications.\n\n## Key Highlights\n\n### 1. Enhanced Performance\nLaravel 12 introduces lazy loading optimizations and query caching improvements that can boost your application's performance by up to 40%.\n\n### 2. New Artisan Commands\nThe new `php artisan make:action` command streamlines the creation of action classes, promoting single responsibility principle.\n\n### 3. Improved Type Safety\nBetter PHP 8.3 integration with improved type hints and return types across the framework.\n\n```php\n\u002F\u002F New Action class pattern\nclass CreateUserAction\n{\n    public function execute(array $data): User\n    {\n        return User::create($data);\n    }\n}\n```\n\n## Migration Guide\nUpgrading from Laravel 11 to 12 is straightforward. Most applications won't require any code changes.","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1618477247222-acbdb0e159b3?w=800&auto=format&fit=crop","Laravel",[14,15,16,17],"Laravel 12","PHP","Framework","Updates","Satish Vishwakarma","2026-04-15",true,[22,23,24],2,3,4,"laravel",{"id":22,"slug":27,"title":28,"subtitle":29,"shortDescription":30,"description":31,"featureImage":32,"category":12,"tags":33,"author":18,"publishedDate":38,"featured":20,"relatedPosts":39,"tech":25},"laravel-service-container-deep-dive","Laravel Service Container: A Deep Dive","Understanding dependency injection and IoC in Laravel","Master the Laravel Service Container to write more maintainable and testable code.","The Service Container is the heart of Laravel's dependency injection system. Understanding it deeply will transform how you architect your applications.\n\n## What is the Service Container?\n\nThe Service Container is a powerful tool for managing class dependencies and performing dependency injection. It's essentially a registry of all your application's bindings.\n\n## Binding Basics\n\n```php\n\u002F\u002F Simple binding\n$this->app->bind(PaymentGateway::class, StripePaymentGateway::class);\n\n\u002F\u002F Singleton binding\n$this->app->singleton(Logger::class, function ($app) {\n    return new FileLogger($app['config']['logging.path']);\n});\n\n\u002F\u002F Instance binding\n$this->app->instance(Config::class, $configInstance);\n```\n\n## Contextual Binding\n\nWhen you need different implementations for different classes:\n\n```php\n$this->app->when(PhotoController::class)\n    ->needs(Filesystem::class)\n    ->give(function () {\n        return Storage::disk('photos');\n    });\n```\n\n## Best Practices\n\n1. Always program to interfaces\n2. Use constructor injection\n3. Avoid the service locator pattern\n4. Keep your bindings organized in Service Providers","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1555099962-4199c345e5dd?w=800&auto=format&fit=crop",[34,35,36,37],"Service Container","Dependency Injection","IoC","Architecture","2026-04-10",[5,23,40],5,{"id":23,"slug":42,"title":43,"subtitle":44,"shortDescription":45,"description":46,"featureImage":47,"category":12,"tags":48,"author":18,"publishedDate":53,"featured":54,"relatedPosts":55,"tech":25},"laravel-middleware-complete-guide","Laravel Middleware: Complete Guide with Examples","Learn how to create and use middleware effectively","A comprehensive guide to Laravel middleware for filtering HTTP requests.","Middleware provides a convenient mechanism for filtering HTTP requests entering your application. Let's explore everything about Laravel middleware.\n\n## Creating Middleware\n\n```bash\nphp artisan make:middleware EnsureUserIsAdmin\n```\n\n```php\nclass EnsureUserIsAdmin\n{\n    public function handle(Request $request, Closure $next): Response\n    {\n        if (! $request->user()?->isAdmin()) {\n            return redirect('home');\n        }\n\n        return $next($request);\n    }\n}\n```\n\n## Before & After Middleware\n\n### Before Middleware\n```php\npublic function handle($request, Closure $next)\n{\n    \u002F\u002F Perform action before request is handled\n    return $next($request);\n}\n```\n\n### After Middleware\n```php\npublic function handle($request, Closure $next)\n{\n    $response = $next($request);\n    \u002F\u002F Perform action after request is handled\n    return $response;\n}\n```\n\n## Middleware Groups\n\nGroup middleware for web and API routes in your `bootstrap\u002Fapp.php`:\n\n```php\n->withMiddleware(function (Middleware $middleware) {\n    $middleware->web(append: [\n        MyCustomMiddleware::class,\n    ]);\n})\n```","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1516116216624-53e697fedbea?w=800&auto=format&fit=crop",[49,50,51,52],"Middleware","Security","HTTP","Request Handling","2026-04-05",false,[5,22,24],{"id":24,"slug":57,"title":58,"subtitle":59,"shortDescription":60,"description":61,"featureImage":62,"category":12,"tags":63,"author":18,"publishedDate":68,"featured":54,"relatedPosts":69,"tech":25},"laravel-events-listeners-guide","Events and Listeners in Laravel: Practical Guide","Decouple your application logic with events","Learn how to use Laravel's event system to build loosely coupled applications.","Laravel's events provide a simple observer implementation, allowing you to subscribe and listen for various events in your application.\n\n## Creating Events\n\n```bash\nphp artisan make:event OrderPlaced\n```\n\n```php\nclass OrderPlaced\n{\n    use Dispatchable, SerializesModels;\n\n    public function __construct(\n        public Order $order\n    ) {}\n}\n```\n\n## Creating Listeners\n\n```bash\nphp artisan make:listener SendOrderNotification --event=OrderPlaced\n```\n\n```php\nclass SendOrderNotification\n{\n    public function handle(OrderPlaced $event): void\n    {\n        $event->order->user->notify(\n            new OrderConfirmation($event->order)\n        );\n    }\n}\n```\n\n## Dispatching Events\n\n```php\n\u002F\u002F Using the event helper\nevent(new OrderPlaced($order));\n\n\u002F\u002F Using the dispatch method\nOrderPlaced::dispatch($order);\n```\n\n## Event Discovery\n\nLaravel can automatically discover event listeners:\n\n```php\npublic function shouldDiscoverEvents(): bool\n{\n    return true;\n}\n```","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1551288049-bebda4e38f71?w=800&auto=format&fit=crop",[64,65,66,67],"Events","Listeners","Observer Pattern","Decoupling","2026-03-28",[22,23,40],{"id":40,"slug":71,"title":72,"subtitle":73,"shortDescription":74,"description":75,"featureImage":76,"category":12,"tags":77,"author":18,"publishedDate":81,"featured":20,"relatedPosts":82,"tech":25},"laravel-rest-api-best-practices","Laravel REST API Best Practices 2026","Build scalable and maintainable APIs with Laravel","A comprehensive guide to building production-ready REST APIs with Laravel.","Building a REST API requires careful consideration of various factors. Here's a complete guide to Laravel API best practices.\n\n## API Versioning\n\n```php\n\u002F\u002F routes\u002Fapi.php\nRoute::prefix('v1')->group(function () {\n    Route::apiResource('users', UserController::class);\n});\n```\n\n## API Resources\n\n```php\nclass UserResource extends JsonResource\n{\n    public function toArray(Request $request): array\n    {\n        return [\n            'id' => $this->id,\n            'name' => $this->name,\n            'email' => $this->email,\n            'created_at' => $this->created_at->toISOString(),\n            'posts' => PostResource::collection($this->whenLoaded('posts')),\n        ];\n    }\n}\n```\n\n## Consistent Response Format\n\n```php\ntrait ApiResponse\n{\n    protected function success($data, $message = null, $code = 200)\n    {\n        return response()->json([\n            'success' => true,\n            'message' => $message,\n            'data' => $data\n        ], $code);\n    }\n\n    protected function error($message, $code = 400)\n    {\n        return response()->json([\n            'success' => false,\n            'message' => $message,\n            'data' => null\n        ], $code);\n    }\n}\n```\n\n## Rate Limiting\n\n```php\nRateLimiter::for('api', function (Request $request) {\n    return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());\n});\n```","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1558494949-ef010cbdcc31?w=800&auto=format&fit=crop",[78,79,80,37],"REST API","Backend","Best Practices","2026-03-20",[5,22,24],{"id":84,"slug":85,"title":86,"subtitle":87,"shortDescription":88,"description":89,"featureImage":90,"category":12,"tags":91,"author":18,"publishedDate":94,"featured":54,"relatedPosts":95,"tech":25},6,"laravel-facades-explained","Understanding Laravel Facades: How They Work","Demystifying the magic behind Laravel facades","Learn how Laravel facades work under the hood and when to use them.","Facades provide a static interface to classes available in the application's service container. Let's understand how they work.\n\n## How Facades Work\n\n```php\nuse Illuminate\\Support\\Facades\\Cache;\n\nCache::get('key');\n```\n\nThis is equivalent to:\n\n```php\napp('cache')->get('key');\n```\n\n## Creating Custom Facades\n\n```php\nnamespace App\\Facades;\n\nuse Illuminate\\Support\\Facades\\Facade;\n\nclass Payment extends Facade\n{\n    protected static function getFacadeAccessor(): string\n    {\n        return 'payment';\n    }\n}\n```\n\nRegister in your service provider:\n\n```php\npublic function register(): void\n{\n    $this->app->singleton('payment', function ($app) {\n        return new PaymentGateway($app['config']['payment']);\n    });\n}\n```\n\n## Real-Time Facades\n\n```php\nuse Facades\\App\\Services\\PaymentService;\n\nPaymentService::process($order);\n```\n\n## When to Use Facades\n\n- Quick prototyping\n- Simple applications\n- When testability isn't a primary concern\n\n## When to Avoid Facades\n\n- When building large applications\n- When you need clear dependency declarations\n- In domain logic where explicit dependencies are preferred","https:\u002F\u002Fimages.unsplash.com\u002Fphoto-1504639725590-34d0984388bd?w=800&auto=format&fit=crop",[92,93,34,37],"Facades","Design Patterns","2026-03-15",[22,23,40],1779734544498]