79738592

Date: 2025-08-18 10:36:24
Score: 1
Natty:
Report link

Or if you want to load it with the base query, you should use method `with`.

Here's an example:

$model_2 = Model2::query()
    ->where('name', $name)
    ->with('categories')
    ->get(); // Returns the Collection of Model2 with loaded relation of category 
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: yeashy