select certain columns in get laravel code example
Example 1: laravel get certain columns
ModelName::all('column1', 'column2', 'column3');
Example 2: get specific columns using with() function in laravel eloquent
Post::with('user:id,username')->get();