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
Post a Comment