lundi 27 mars 2017

Laravel displaying elements distinctly

public function employeebanvisitor(Request $request) { 
    $vis = bookingmodel::distinct('visitorname')
        ->select(
            'id',
            'visitorname',
            'visitorphonenumber',
            'compname',
            'designation'
        )
        ->where('empmail',Auth::user()->email)
        ->get(); 
    return view('employee.employeebanvisitor',compact('vis')); 
}

In the above query i need to display the list distinctly where the the distinct element is visitorname.But this command does not return elements distinctly.Any Help or suggestion is most welcomed.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire