MeshWorld India Logo MeshWorld.
Back to Tags
Topic View

#Eloquent.

Explore Eloquent articles, tutorials, guides, and code examples on MeshWorld India. Learn best practices, get practical tips, and level up your Eloquent skills.

13 posts
Jan 2020 – Apr 2026
Filed under this topic
AI-Assisted Eloquent: Database Design with Laravel Boost
Laravel 5 min read

AI-Assisted Eloquent: Database Design with Laravel Boost

Leverage Laravel Boost and AI to generate migrations, design Eloquent relationships, and optimize database schemas. A complete Laravel 13 AI development guide.

Rachel
Rachel
Nested Eager Loading in Laravel Eloquent Explained
Laravel 5 min read

Nested Eager Loading in Laravel Eloquent Explained

Reduce database queries in Laravel using nested eager loading. Learn the syntax, conditional loading, and how to optimize deeply related Eloquent models.

Vishnu
Vishnu
Update a Laravel Record Without Touching Timestamps
Laravel 5 min read

Update a Laravel Record Without Touching Timestamps

Update Laravel records without changing updated_at using four methods: the timestamps property, saveQuietly(), withoutTimestamps(), or the query builder.

Vishnu
Vishnu
Create a Laravel Collection from an Array
Laravel 5 min read

Create a Laravel Collection from an Array

Learn how to wrap a plain PHP array in a Laravel Collection using collect() or new Collection(). Covers filter, map, sum, and groupBy with real examples.

Vishnu
Vishnu
Get Last 30 Days Records in Laravel with Carbon
Laravel 5 min read

Get Last 30 Days Records in Laravel with Carbon

Query the last 30 days of records in Laravel using Carbon. Learn three efficient methods including whereBetween() and reusable model query scopes.

Vishnu
Vishnu
Laravel Eloquent whereTime() Method Explained
Laravel 5 min read

Laravel Eloquent whereTime() Method Explained

Filter Laravel records by time using the whereTime() method. Learn syntax, operators, and practical examples for precise time-based Eloquent queries.

Vishnu
Vishnu
Laravel Eloquent whereDate() Method Explained
Laravel 5 min read

Laravel Eloquent whereDate() Method Explained

Filter Laravel records by date while ignoring time using whereDate(). Learn the syntax, comparison operators, and why raw where() calls often fail for dates.

Vishnu
Vishnu
Laravel firstOrCreate(): Find or Create a Record
Laravel 5 min read

Laravel firstOrCreate(): Find or Create a Record

Find the first matching record or create a new one automatically with Laravel's firstOrCreate(). Learn syntax, parameters, and how it differs from firstOrNew().

Vishnu
Vishnu
How to Use Laravel firstOrNew() to Find or Prepare Records
Laravel 5 min read

How to Use Laravel firstOrNew() to Find or Prepare Records

Learn how Laravel's firstOrNew() finds a matching record or returns a new instance. Compare it with firstOrCreate() and see real-world examples for your app.

Vishnu
Vishnu
Move Records Between Tables in Laravel
Laravel 5 min read

Move Records Between Tables in Laravel

How to move a database record from one table to another in Laravel using replicate(), setTable(), and DB::transaction() to keep the operation atomic and safe.

Vishnu
Vishnu
Route Model Binding in Laravel Explained
Laravel 5 min read

Route Model Binding in Laravel Explained

Automatically resolve Eloquent models from URL parameters in Laravel. Learn about implicit binding, custom keys, scoped bindings, and soft deletes.

Vishnu
Vishnu
Change Laravel Model Timestamp Column Names
Laravel 5 min read

Change Laravel Model Timestamp Column Names

Rename created_at and updated_at in Laravel using model constants. Learn how to customize timestamp names, disable them, or change date formats easily.

Vishnu
Vishnu
Get an Array of IDs from an Eloquent Collection
Laravel 5 min read

Get an Array of IDs from an Eloquent Collection

Extract an array of IDs from a Laravel Eloquent collection using pluck(), modelKeys(), or direct queries. Find the most efficient method for your needs.

Vishnu
Vishnu