returns a value of some value to 1 value only in laravel -


say have following:

    id directorate     1  corporate     2  corporate     3  corporate     4  network     5  network 

what want query return is:

1  corporate 2  network 

how describe query

as elias commented:

$result = yourmodel::groupby('directorate')->get(); 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -