Blog

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

Laravel Company

Manually inject model relation using Eloquent

# Manually Injecting Model Relations Using Eloquent: A Developer's Guide As developers working with Eloquent, we are constantly seeking ways to optimize data...

2026-06-29 Stefan Bogdanescu
Laravel Company

Model::update() should not be called statically

# Model::update() should not be called statically: Understanding Eloquent Instance vs. Static Methods As developers working with the Laravel Eloquent ORM,...

2026-06-29 Stefan Bogdanescu
Laravel Company

How can I make laravel casting array on the model?

# Unlocking JSON: How to Make Laravel Cast Database JSON Columns to Native PHP Arrays As developers working with modern relational databases, storing complex,...

2026-06-29 Stefan Bogdanescu
Laravel Company

How to fix EOF Server Ollama Error when embedding

# How to Fix EOF Server Error When Embedding with Ollama in Laravel RAG Systems Building sophisticated Retrieval-Augmented Generation (RAG) systems using...

2026-06-29 Stefan Bogdanescu
Laravel Company

How to use DataTables with Laravel Vite?

# How to Use DataTables with Laravel Vite: Solving the `DataTable is not a function` Error As a developer working with modern stacks like Laravel and Vite,...

2026-06-29 Stefan Bogdanescu
Laravel Company

Remove a package using composer (without updating other packages)

# Safely Removing Composer Packages: How to Use `composer remove` Without Updating Dependencies As senior developers working with PHP ecosystems, we constantly...

2026-06-29 Stefan Bogdanescu
Laravel Company

How to get data of previous week in Laravel 5.1?

# Mastering Date Ranges: How to Get Data for the Previous Week in Laravel As developers, one of the most common tasks we face is manipulating time-series...

2026-06-29 Stefan Bogdanescu
Laravel Company

Filament v3 : relation Manager with hasMany and BelongsTo

# Filament v3: Mastering Relations Managers with `hasMany` and `BelongsTo` Welcome to the world of Filament! As you dive into building complex administrative...

2026-06-29 Stefan Bogdanescu
Laravel Company

Where can I set headers in laravel

Title: Setting Global Headers for All Views in Laravel Introduction: In your quest to set headers globally for all views within your Laravel application,...

2026-06-29 Stefan Bogdanescu
Laravel Company

Laravel Insert Seed if data doesn't already exist

# Laravel Seeding Masterclass: Inserting Data Only If It Doesn't Exist Is there any way to run a Laravel `seed` to only insert records if they do not already...

2026-06-29 Stefan Bogdanescu
Laravel Company

allow only requests from domain and block other sources

# Securing Your API: Allowing Requests Only From Your Frontend Domain As a senior developer, I frequently encounter scenarios where we need to protect...

2026-06-29 Stefan Bogdanescu
Laravel Company

laravel eloquent JOIN ON multiple condition

# Mastering Complex Data Aggregation in Laravel Eloquent: Joining and Summing Multiple Conditions As a senior developer, we constantly face the challenge of...

2026-06-29 Stefan Bogdanescu