/** * Process datatables ajax request. * * @return \Illuminate\Http\JsonResponse */ public function anyData() { return Datatables::of(Employee::select('*'))->make(true); }
public function __construct() { $this->branchid = Auth::user()->branchid; $this->employees = Employee::select('id')->where('branchid', $this->branchid)->where('empstatus', '>', '0')->get(); }