validated(); $category = EventCategory::create($validated); $category->save(); return (new EventCategoryResource($category)) ->response() ->setStatusCode(201); } /** * Display the specified resource. * * @param \App\Models\EventCategory $eventCategory * @return \Illuminate\Http\Response */ public function show(EventCategory $eventCategory) { // } /** * Show the form for editing the specified resource. * * @param \App\Models\EventCategory $eventCategory * @return \Illuminate\Http\Response */ public function edit(EventCategory $eventCategory) { // } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param \App\Models\EventCategory $eventCategory * @return \Illuminate\Http\Response */ public function update(Request $request, EventCategory $eventCategory) { // } /** * Remove the specified resource from storage. * * @param \App\Models\EventCategory $eventCategory * @return \Illuminate\Http\Response */ public function destroy(EventCategory $eventCategory) { // } }