Category: Database & Eloquent ORM

  • Using Eloquent with Pagination in Laravel

    Introduction Pagination is one of the essential features in any modern web application that displays large datasets. Whether you are building an e-commerce product listing page, a blog article list, an admin panel with user records, or any searchable and filterable list, you will always need pagination. Laravel makes this process incredibly simple using Eloquent…

  • Introduction to Eloquent Relationships in Laravel

    Eloquent ORM is one of Laravel’s most defining features. It allows developers to work with the database using expressive, human-readable syntax instead of raw SQL. One of the core strengths of Eloquent is its ability to represent relationships between database tables effortlessly. Instead of writing complex join queries manually, Eloquent relationships allow you to define…

  • Introduction to Deleting Records With Eloquent

    Deleting records is a fundamental aspect of database management in any web application. Laravel’s Eloquent ORM provides a clean, expressive, and intuitive interface for removing records from the database. Whether you are deleting a specific row, deleting multiple rows based on a condition, soft deleting items for recoverability, or performing bulk operations, Eloquent makes the…

  • Updating Data With Eloquent ORM

    Updating data in a database is one of the most common tasks in web application development. Whether you are building an inventory system, a blog, a customer management tool, or an e-commerce platform, you will constantly update records such as user profiles, product details, post content, orders, categories, and more. Laravel’s Eloquent ORM makes this…

  • Understanding How to Insert Data Using Eloquent in Laravel

    Eloquent ORM is one of the most powerful and elegant features of Laravel. It provides a clean, expressive, and efficient way of interacting with the database using models instead of raw SQL queries. One of the most common tasks when working with a database is inserting new records, and Eloquent makes this process remarkably easy…

  • Fetching Data Using Eloquent

    Introduction Laravel’s Eloquent ORM is one of the most powerful and developer-friendly features in the entire framework. It transforms database interactions into clean, expressive, and readable PHP code. Instead of manually writing long SQL statements, Eloquent allows you to describe your queries using elegant, object-oriented syntax. This not only makes your code shorter but also…

  • Introduction to Database Migrations in Laravel

    Database migrations are one of the most powerful features of the Laravel framework. They provide a structured, version-controlled approach to managing database tables, columns, indexes, and relationships. Instead of manually creating tables in a database management tool or writing raw SQL, migrations allow you to define your database structure using PHP code. This makes your…

  • Introduction to Creating a Model in Laravel

    In Laravel, models play a central role in the architecture of any application. They act as the connection between your PHP code and your database. While controllers handle incoming requests and views display content to the user, models handle data retrieval, manipulation, and storage. Understanding models is essential for building dynamic applications that interact with…

  • What Is Eloquent ORM in Laravel

    Laravel is one of the most popular PHP frameworks in the world, and one of the biggest reasons behind its popularity is Eloquent ORM. Eloquent is Laravel’s built-in Object Relational Mapper that allows developers to work with databases using clean, expressive, and easy-to-understand PHP code instead of writing long and complex SQL queries. Because of…