public function projects() { $data['projects'] = Project::all(); $data['page'] = Page::find(3); $data['meta_title'] = ''; $data['meta_desc'] = ''; return view('projects', $data); }
public function index() { if (Auth::user()->can_show(3)) { $data['meta_title'] = 'Gestion des projects'; $data['projects'] = Project::all(); return view('admin.project.index', $data); } else { return redirect()->route('admin.dashboard.index')->with(['type' => 'danger', 'message' => '<span class="fa fa-ban"></span> Vous n\'avez pas les droits nécessaires pour accéder à cette partie.']); } }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $records = Project::all(); return view('projects.index', compact('records')); }