Passing parameters to Middleware in Laravel 5.1
A guide on how to pass parameters to middleware in Laravel 5.1, using role-based authentication as a practical example.
mattstauffer.com is the personal blog of Matt Stauffer, a web developer, author, and educator specializing in Laravel, PHP, and full-stack web development. Matt shares tutorials, insights, and resources on modern web development, covering topics like backend development, JavaScript, and Laravel best practices. He is also the author of Laravel: Up & Running and a host of the Laravel Podcast. Through his blog, Matt provides practical advice for developers, project management tips, and insights into maintaining a productive development workflow. His content is designed to help developers of all levels improve their skills and stay updated with the latest trends in the web development industry.
176 Articles from this blog
A guide on how to pass parameters to middleware in Laravel 5.1, using role-based authentication as a practical example.
Explains how to use Laravel Blade Service Injection to directly inject IOC objects into templates, reducing controller boilerplate.
A guide to creating a welcome email series (drip campaign) for new subscribers using the Sendy newsletter platform.
A guide on how to install and upgrade to an in-development, pre-release version of the Laravel PHP framework using Composer.
How to apply a secondary SSL certificate for the www. subdomain on a Laravel Forge site to prevent browser security errors.
A technical guide on resolving blocked PUT/PATCH/DELETE requests in Angular/Laravel/Symfony APIs using X-HTTP-Method-Override and HTTPS.
A guide to using Laravel 5.1's broadcasting feature with Pusher.com and Socket.io for real-time web notifications.
A tutorial on building a Lumen microservice that generates Heroku-style random server names using a thesaurus API.
Lumen is a new micro-framework from Laravel, designed for building fast microservices and small, single-purpose applications.
A developer shares a code refactor by Laravel's creator, highlighting lesser-known features like Cache::remember.
A technical guide on enabling Gzip compression on Nginx servers to improve website loading speed and address Google PageSpeed warnings.
Envoyer.io is a new zero-downtime deployment service for PHP and Laravel projects, launched by Taylor Otwell.
A guide to conditionally loading Laravel 5 service providers based on the application environment, like production vs. development.
A guide on converting Laravel 5's default frontend scaffold from CDN links to using Bower for dependency management.
A tutorial on using the League/CSV package to export a Laravel Eloquent collection to a downloadable CSV file.
A screencast showing the rapid development of Gistlog.co from idea to live prototype in under two hours using Laravel.
Explains Laravel 5.0's Eloquent attribute casting feature, which automatically converts model attributes to specific data types like boolean or integer.
A discussion of different approaches to organizing PHP class namespaces, focusing on modularity and cohesion in small-to-medium apps.
An introduction to PHP namespaces, explaining their purpose, syntax, and how to use them for better code organization.
A guide to creating custom error pages (like 404) in Laravel 5.0 by adding specific view files.