skip to Main Content

Laravel – Route not defined in a href

Route [paslon.create] not defined. <a href="{{route('daftar.create')}}" class="btn btn-primary btn-sm mb-3">tambah1</a> controller public function create() { return view('daftar.create'); } web.php Route::get('/create', function () { return view('/daftar/create'); }); my solution is changing in <a href="/create" class="btn btn-primary btn-sm mb-3">tambah1</a> and in web…

VIEW QUESTION

Laravel – groupBy in Controller Index function

I have data that I'm trying to groupBy a field on index function public function index() { abort_if(Gate::denies('workstep_access'), Response::HTTP_FORBIDDEN, '403 Forbidden'); $thisUser = Auth::user(); $worksteps = Workstep::with(['site_id'])->where('site_id', $thisUser->site_id)->get(); return view('admin.worksteps.process', compact('worksteps')); } Adding ->groupBy('subprocess_id'); before->get(); As below $worksteps = Workstep::with(['site_id'])->where('site_id',…

VIEW QUESTION
Back To Top
Search