95 lines
2.1 KiB
PHP
95 lines
2.1 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Http\Requests\EventCategoryRequest;
|
|
use App\Http\Resources\EventCategory as EventCategoryResource;
|
|
use App\Models\EventCategory;
|
|
use Illuminate\Http\Request;
|
|
|
|
class EventCategoryController extends Controller
|
|
{
|
|
/**
|
|
* Display a listing of the resource.
|
|
*
|
|
* @return \Illuminate\Http\Response
|
|
*/
|
|
public function index()
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Show the form for creating a new resource.
|
|
*
|
|
* @return \Illuminate\Http\Response
|
|
*/
|
|
public function create()
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Store a newly created resource in storage.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return \Illuminate\Http\Response
|
|
*/
|
|
public function store(EventCategoryRequest $request)
|
|
{
|
|
$validated = $request->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)
|
|
{
|
|
//
|
|
}
|
|
}
|