Blog

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

Laravel Company

How do I get a "select count(*) group by" using laravel eloquent

Title: Achieving "select count(*) group by" Using Laravel Eloquent for Advanced Querying There might be several ways to tackle this problem using Laravel...

2026-06-29 Stefan Bogdanescu
Laravel Company

Convert date to milliseconds in laravel using Carbon

Title: Converting Dates to Milliseconds Using Laravel's Carbon Library Introduction: In this blog post, we will explore how to work with dates and timestamps...

2026-06-29 Stefan Bogdanescu
Laravel Company

laravel eloquent ignore error when inserting a duplicate key

Title: Handling Duplicate Key Errors When Inserting Data Using Laravel Eloquent Introduction: In a modern web application, data management is crucial for...

2026-06-29 Stefan Bogdanescu
Laravel Company

Unable to create lockable file - Laravel 8 & PHP 8

Title: Unable to create lockable file - Laravel 8 & PHP 8: A Comprehensive Guide for Developers Body: Laravel, the popular open-source web application...

2026-06-29 Stefan Bogdanescu
Laravel Company

Livewire encountered corrupt data when trying to hydrate the … component

Title: Troubleshooting Livewire Corrupt Data Issue with Laravel and MySQL Stored Procedures Introduction Livewire is an impressive and popular JavaScript...

2026-06-29 Stefan Bogdanescu
Laravel Company

Automatically deleting related rows in Laravel (Eloquent ORM)

Title: Effortlessly Managing Related Rows Deletion with Laravel Eloquent ORM Introduction: In Laravel, the Eloquent Object Relational Mapper (ORM) provides a...

2026-06-29 Stefan Bogdanescu
Laravel Company

Eloquent where condition based on a "belongs to" relationship

Title: Utilizing Eloquent Relationships for Complex Querying with BelongsTo Conditions Body: In Laravel's world of expressive, elegant code, understanding how...

2026-06-29 Stefan Bogdanescu
Laravel Company

Laravel collection contains

Title: Understanding Laravel Collection Objects and Using contains() Method Efficiently Laravel has made working with collections easier through a variety of...

2026-06-29 Stefan Bogdanescu
Laravel Company

Laravel Call to a member function toArray() on array Error

Title: Solving the Laravel Call to a member function toArray() on array Error Body: Introduction: In this blog post, we will be discussing a common issue that...

2026-06-29 Stefan Bogdanescu
Laravel Company

htmlspecialchars() expects parameter 1 to be string array given

Title: Understanding and Resolving the Problem of 'htmlspecialchars() expects parameter 1 to be string array given' Error in Laravel Applications In this blog...

2026-06-29 Stefan Bogdanescu
Laravel Company

Laravel 5 - validate array as required, but allow an empty array to be passed

Title: A Practical Solution for Validating Array Presence with Optional Empty Arrays in Laravel 5.4 Introduction: Laravel's validation system offers robust...

2026-06-29 Stefan Bogdanescu
Laravel Company

Passing id through an link href in Laravel

Title: Passing ID Through Link Href in Laravel - A Comprehensive Guide Introduction: In Laravel, there are multiple ways to pass an id through link hrefs. To...

2026-06-29 Stefan Bogdanescu