Answers for "how to select in laravel 8 eloquent orm"

PHP
2

eloquent with select

Post::query()
    ->with(array('user' => function($query) {
        $query->select('id','username');
    }))
    ->get();
Posted by: Guest on August-07-2021
0

Laravel query where and

Table::where('Column', Value)->where('NewColumn', Value)->get();
Posted by: Guest on September-04-2020

Browse Popular Code Answers by Language