Blog

Insights, guides, and best practices from the Laravel Company team.

Laravel Company

How to force FormRequest return json in Laravel 5.1?

# How to Force FormRequest to Return JSON in Laravel 5.1 for API Responses As developers building robust APIs with Laravel, handling validation errors...

2026-06-29 Stefan Bogdanescu
Laravel Company

Laravel get array of filenames from folder

# Extracting Just Filenames: A Laravel Guide to File System Navigation I am getting an array of filenames from a folder like this: ```php $files =...

2026-06-29 Stefan Bogdanescu
Laravel Company

Is Laravel really this slow?

Title: Unraveling Laravel Performance Issues: Optimizing Your App for Speed Body: The question of Laravel being slow is not uncommon among developers who are...

2026-06-29 Stefan Bogdanescu
Laravel Company

Laravel: Writing to /.../.config/psysh is not allowed

# Laravel Deployment Headache: Why Writing to `/.../.config/psysh` Fails on Production Servers As developers, we often transition applications from a local...

2026-06-29 Stefan Bogdanescu
Laravel Company

How is it possible to test services with Laravel using PhpUnit?

# How is it possible to test services with Laravel using PhpUnit? Mastering Dependency Injection Testing Testing complex components, especially service layers...

2026-06-29 Stefan Bogdanescu
Laravel Company

reverse() on querybuilder get() changes the collection results

# Deciphering Collection Flow: Why `reverse()` on a QueryBuilder Result Behaves Unexpectedly As senior developers, we often deal with the nuances of how data...

2026-06-29 Stefan Bogdanescu
Laravel Company

How do i change the directory of the Vite manifest in Laravel, or how do I serve two Vite projects in on Laravel app?

# Serving Multiple Vite Frontends in Laravel: Mastering Directory Structure and Manifests As a senior developer working within the Laravel ecosystem, managing...

2026-06-29 Stefan Bogdanescu
Laravel Company

eloquent attempt to read property on int

# Eloquent's Tricky Dance: Why You Get "Attempt to read property on int" When Reading Related Data in Laravel As a developer diving into the world of Laravel,...

2026-06-29 Stefan Bogdanescu
Laravel Company

How to redirect in Laravel form on Post request?

# How to Redirect in Laravel Forms on POST Requests: Solving the Submission Mystery As a senior developer, I often encounter situations where the fundamental...

2026-06-29 Stefan Bogdanescu
Laravel Company

Object of class Carbon\Carbon could not be converted to int

# Unlocking Timestamps: How to Extract Integer Values from Carbon Objects in Laravel As a senior developer working with the Laravel ecosystem, dealing with...

2026-06-29 Stefan Bogdanescu
Laravel Company

Unable to prepare route [api/user] for serialization. Uses Closure

# Solving the Serialization Puzzle: Why You See "Unable to prepare route [api/user] for serialization. Uses Closure" in Laravel As a senior developer working...

2026-06-29 Stefan Bogdanescu
Laravel Company

Laravel Validation- depends on the value of another input field

# Mastering Conditional Validation in Laravel: Validating Based on Other Fields As senior developers working with Laravel, we frequently encounter scenarios...

2026-06-29 Stefan Bogdanescu