Karan Datwanibackpackforlaravel.hashnode.dev·Nov 11, 2024🍣 Sushi — Your Eloquent model driver for other data sourcesIn Laravel projects, we usually store data in databases, create tables, and run migrations. But not every bit of data needs that level of complexity. Sometimes, you have small, static datasets—like a list of countries, settings, or configs—that hardl...Laravel
Bedram TamangforJoBins Engineeringblog.jobins.jp·Aug 1, 2024Eloquent Trick: Laravel Model from SubqueryIn Laravel, it's common to define a model's corresponding table using the table property, such as: class User extends Model { protected $table = 'users'; } This approach maps the model directly to a database table. However, there are situations wh...Laravel
Sean Kegelseankegel.com·Jul 28, 2024Laravel: Casting Eloquent JSON FieldsI have a short post today to cover something I recently used in a project. I had a table using a JSON column and though they are extremely flexible, I like to know what data exists in the column. To accomplish this, I use a simple data transfer objec...1 like·1.4K readsLaravel
manish maharjanforJoBins Engineeringblog.jobins.jp·Jun 25, 2024Eager Loading with JSON Columns in LaravelManaging relationships among different entities has been a common requirement in the context of modern web applications. Relationships are maintained to organize and structure data in databases, facilitating efficient querying and manipulation of rel...2 likes·83 readsLaravel
Haseeb Mirzahaseebmirza.hashnode.dev·May 29, 2024Streamlining Eloquent Queries: Mastering User Scopes and Global Scopes in LaravelIntro As a Laravel developer, I've found that user scopes and global scopes are incredibly useful tools for managing complex Eloquent queries. In this article, I'll walk you through how to leverage these features to make your code more efficient and ...Laraveldevelopment
kalam ahmedkalam714.hashnode.dev·Apr 2, 2024Enhancing Database Query Performance with Advanced Laravel Eloquent TechniquesAs a chef, you know that ingredient quality significantly affects the flavor of your dishes. Similarly, in web development, optimizing your database queries is like using top-notch ingredients to boost your recipe’s performance. Imagine you’re cookin...10 likesAdvanced Techniques
MKhalidmkhalid.hashnode.dev·Jan 14, 2024Laravel Models: Your Gateway to Efficient Data ManagementHey there! Are you diving into the fascinating world of Laravel, or maybe just looking to brush up on some concepts? Either way, you’re in the right place. Today, we’re going to chat about Laravel models – those magical bits of code that make working...Laravel
MKhalidmkhalid.hashnode.dev·Jan 11, 2024Mastering Eloquent ORM in Laravel: Advanced Tips and TechniquesEloquent ORM in Laravel simplifies the interaction with databases, offering an expressive and fluent way to handle database operations. In this post, we’ll explore advanced techniques to make the most of Eloquent ORM, enhancing the efficiency and sca...1 likePHP
Ghanshyam DigitalforGhanshyam Digitalblog.ghanshyamdigital.com·Jan 30, 2023Building a Self-Referencing Model in Laravel: A Step-by-Step Guide1. Introduction Self-referencing models, also known as recursive relationships, are a powerful tool in Laravel's Eloquent ORM (Object-Relational Mapping) system. They allow a model to have a relationship with itself, which can be useful for data stru...6 likes·5.5K readsLaravel
Jasper Teyjaspertey.com·Jan 10, 2023Another way to prepend table names to columns in Eloquent queriesWhen writing complex queries in Eloquent, you will more than likely encounter scenarios forcing you to prefix column references with the table name to handle SQL ambiguity, especially when joins are involved. Consider the following ways you might've ...70 readsLaravel