Blog
Insights, guides, and best practices from the Laravel Company team.
Using the Factory Pattern in PHP and Laravel
# Using the Factory Pattern in PHP and Laravel: Finding vs. Creating Models As developers building complex applications with frameworks like Laravel, we often...
Customize Laravel error reporting to remove stack trace
# Customize Laravel Error Reporting to Remove Stack Traces Dealing with exceptions in a Laravel application is inevitable. When something goes wrong, seeing a...
Laravel Guzzle GET request
# Mastering HTTP Requests in Laravel: Solving Guzzle Dependency Errors As developers working within the robust Laravel ecosystem, making external API calls is...
Solve issue of upgrading to php 7.2 in laravel 5.4 application
# Solving PHP Compatibility Nightmares: Upgrading Laravel 5.4 to PHP 7.2 Upgrading a legacy application, especially when touching core PHP versions, is often...
Get field data when using Spout to read an Excel file
# Mastering Data Extraction: Getting Field Data from Excel using Spout Reading structured data from external files like Excel spreadsheets is a common...
Laravel Route group and prefix
# Mastering Laravel Route Groups: Prefixing, Parameters, and Middleware for Internationalization As developers working with large applications, managing...
How can you include column headers when exporting Eloquent to Excel in Laravel?
Title: Incorporating Column Headers in Laravel Eloquent Excel Exports Body: We've recently been asked how to include column headers when exporting Eloquent...
Why if I don't put a {{csrf_field()}} at the end of a form (in a Laravel 5 view) I obtain a TokenMismatchException?
# Understanding the `TokenMismatchException`: Why CSRF Tokens are Non-Negotiable in Laravel Forms As developers, especially those new to frameworks like...
laravel post 500 (Internal Server Error)?
This sounds incredibly frustrating. Dealing with intermittent or hard-to-trace server errors, especially when using AJAX for form submissions in a Laravel...
When making a Laravel package, how do I register the service provider and alias of dependency packages?
# Mastering Dependencies: How to Register Service Providers and Alias Packages in Laravel As developers building reusable components—Laravel packages—we...
Laravel form request passedValidation() and $request->validated()
# Laravel Form Request Deep Dive: Understanding `passedValidation()` vs. `$request->validated()` As senior developers working with Laravel, we often dive deep...
Laravel fetch data from two tables without join with pagination
# Laravel: Fetching Data from Disjoint Tables Without Joins and Implementing Pagination As senior developers working with relational databases, one of the most...