middleware('auth'); } public function index() { $adjuncts = Adjunct::orderBy('name')->get(); return view('adjuncts')->with('adjuncts', $adjuncts); } public function store(Request $request){ // validation $this->validate($request,[ 'name' => 'required', ]); // create project $adjunct = new Adjunct; $lastID = Adjunct::orderBy('id','desc')->value('id'); $adjunct->id = number_format($lastID) + 1; $adjunct->name = $request->input('name'); $adjunct->save(); return redirect('/adjuncts')->with('success', 'Adjunct Added'); } }