Tell me how to use select query in laravel?



Tell me how to use select query in laravel?..

Answer / Balwant Kumar Singh

To perform a simple SELECT query in Laravel, you can use the Eloquent ORM's `select()` method on an Eloquent model instance:nn```
$users = AppUser::select('name', 'email')->get();
```

This will return a collection of users with only their names and email addresses.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

What is fillable in laravel model?

1 Answers  


How to get current environment in laravel?

1 Answers  


What is a Laravel - Authentication ?

1 Answers  


What are all the different Route Parameters ?

1 Answers  


what is Laravel-Routing ?

2 Answers  


What are contracts?

1 Answers  


Why composer is used in laravel?

1 Answers  


How to start, stop mysql on valet?

1 Answers  


Does laravel support php 7?

1 Answers  


How to install installing mariadb on homestead?

1 Answers  


Tell me how do I see all of the routes that are defined?

1 Answers  


Why doesn't laravel use semantic versioning?

1 Answers  


Categories