public function profile($id = null) { $adc = ConsortiumGlobal::where('id', '1')->first(); $atas = Ata::where('active', 1)->get(); $disassemblers = Disassembler::lists('name', 'id'); $user = Auth::user(); $types = ProjectType::lists('type', 'id'); $company = Company::where('id', $user->company_id)->first(); if ($id) { $project = Project::find($id); } else { $project = Project::create(['creator_id' => $user->id, 'company_id' => $user->company_id, 'directory_path' => $company->company . '/' . date('Y') . '/']); } return view('projects.profile', compact('adc', 'atas', 'company', 'disassemblers', 'project', 'types', 'user')); }
public function chapters() { // show all $records = Ata::where('section', 'LIKE', '00')->orderBy('chapter')->get(); return $records; }