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.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2n8tonk
via IFTTT

Aucun commentaire:

Enregistrer un commentaire