Skip to content

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 >>>>>>>>>>>>>>>>>>>>>>

php foreach count rows with style positions

I’m trying to create Contest list of users in php. But my code style don’t give me what I want My code: My code output But I want something like this Answer you can wrap the count variable inside a class and style it with css

PHP RecursiveDirectoryIterator and glob() is not working with ñ

here is my path c:CustomersNCRLas Piñas and im trying to get all the csv files. I did the code from here (see top answer) php glob – scan in subfolders for a file and also did a mixed recursive and glob and still cant read the csv inside this folder Answer so far this is what i came of