$project]); System::create([ 'business_id' => $business, 'project_id' => $project, 'name' => $request->name ]); return Business::info($business, true); } public function update($business, $project, $system, Request $request) { permit('projectSystems', ['project_id' => $project]); $system = System::findOrFail($system); $system->update($request->except('_business_info')); return Business::info($business, true); } public function delete($business, $project, $system) { permit('projectSystems', ['project_id' => $project]); $system = System::findOrFail($system); $system->delete(); return Business::info($business, true); } }