Skip to content

Tag: laravel

DB::table($table)->with($relation); it’s possible?

If I use models this is easily resolved, but if I don’t have the availability of using models, would it be possible to get the result equivalent to ->with() with DB::table? Answer No, Here is why Laravel models are using Eloquent, which is an ORM library. For example, a class model could have many teachers relations, and if you want

Pivot Table with 3 Columns to get the value in Laravel 9

I am a new in Laravel and I am trying to get the value from third column id in pivot table I have 3 tables and 4th table is pivot table, so my table structure is as follow TABLE Product Structure Table Attributes Structure Table Attribute Value Structure and I also make pivot table attribute_product <<<<<<<<<<< MODELS OF TABLE >>>>>>>>>>>>>>>>>>>>>>