Database Eloquent Laravel How to use subqueries in laravel 9 December 25, 2022 Navid Anjum Subqueries are useful in Eloquent ORM by Laravel for a number of things. You could utilize subqueries in the following situations, for instance: Advanced filtering Subqueries can be used in…
Database Laravel Polymorphic One of Many Relationship in Laravel December 5, 2022 Navid Anjum When a model is linked to a variety of different models, but depending on the circumstance, we want to connect the most recent, the oldest, or a custom model. Let’s…
Database Laravel Polymorphic One to One Relationship in Laravel December 1, 2022 Navid Anjum Polymorphic One to one When one child model belongs to more than one parent model, this is referred to as polymorphic one-to-one. Assume a cat belongs to a neighborhood and…
Database Laravel Detail explanation of the Eloquent relationships with Laravel 8 & 9 November 12, 2022 Navid Anjum There are different types of relationships in Laravel. We have given a detailed explanation of the eloquent relationship with Laravel One To One Eloquent Relationship An owner may have one…
Database How to use Query builder with eloquent in laravel 8 February 4, 2022 Navid Anjum Building Query: Eloquent models are query builder as well .So we can do everything in eloquent which is possible with query builder. $house=house::where('id',1) ->orderBy('id') ->take(1) ->get(); dd($house); Collection: The Laravel…
Database Learning Eloquent with Laravel 8 January 29, 2022 Navid Anjum Eloquent is an ORM(object relational model) used to interact with database by providing a model for each database table. Creating model: php artisan make:model owner -mc php artisan make:model house…
Database Query builder in laravel 8 January 18, 2022 Navid Anjum Laravel query builder use PDO parameter bindings but PDO does not support binding column name. Retrieve all results form a table: $users=DB::table('users')->get(); return $users; Retrieve all result of specific column…