middleware(function ($request, $next) { $this->user = Auth::guard('web')->user(); return $next($request); }); } /** * Display a listing of the Branchs. * * @param \Modules\Writeoff\DataTables\BranchDataTable $dataTable * * @return mixed */ public function index(BranchDataTable $dataTable, Request $request) { if (is_null($this->user) || !$this->user->can('master.read')) { abort(403, 'Sorry !! You are Unauthorized to view any master data !'); } return $dataTable->render('writeoff::parameter.branches.index'); } /** * Store a newly created Branch in storage. * * @param \Illuminate\Http\Request $request * * @return mixed */ public function store(Request $request) { } /** * Show the form for creating a new Branch. */ public function create() { } /** * Display the specified Branch. * * @param \Modules\Writeoff\Entities\Branch $branch */ public function show(Branch $branch) { } /** * Show the form for editing the specified Branch. * * @param $id */ public function edit($id) { } /** * Update the specified Branch in storage. * * @param \Illuminate\Http\Request $request * @param \Modules\Writeoff\Entities\Branch $branch * * @return mixed */ public function update(Request $request, Branch $branch) { } /** * Remove the specified Branch from storage. * * @param \Modules\Writeoff\Entities\Branch $branch * * @return void */ public function destroy(Branch $branch) { } }