Posts
According to Laravel, Eloquent is an object-relational mapper (ORM) that makes it enjoyable to interact with your database. When using Eloquent, each database table has a corresponding “Model” that is used to interact with that table. In addition to retrieving records from the database table, Eloquent models allow you to insert, update, and delete records from the table as well. In this articl...
17 Laravel Eloquent Tips and Tricks
Mar 19, 2022
24 views
Today, we will learn about creating beautiful API documentation with Swagger in Laravel. API documentation is very important when working in a team. It helps to determine the endpoints and parameters required for any request. In this article, we will use a package known as DarkaOnLine/L5-Swagger in our Laravel application. This package is popular and specifically built to use on Larave...
Laravel API documentation with Swagger
Feb 25, 2022
28 views
In programming, as the size of the project grows, the complexity of the application also grows automatically. In this article, we will learn how we can get the count records that are linked with another table using hasMany relation. We will discuss how we can achieve result using different approaches and their benefits and drawbacks. Let’s talk about the scenario that we are going through at the...
Efficiently Count Related Models in Laravel
Feb 20, 2022
16 views