public function index() { $years = FinancialYear::lists('year', 'year'); $workspace_id = Auth::user()->workspace_id; if ($workspace_id == 1) { $workspace = Workspace::where('status', '=', 1)->lists('name', 'id'); } else { $workspace = Workspace::where(['id' => $workspace_id])->lists('name', 'id'); } return view('reports.materialUsage.index')->with(compact('workspace', 'years')); }
public function index() { $workspaces = Workspace::lists('name', 'id'); $years = FinancialYear::lists('year', 'year'); return view('reports.payrollReport.index')->with(compact('years', 'workspaces')); }