feature: add api for categories

feature: add initial docker build and compose for development mode
This commit is contained in:
jon brookes 2026-01-15 15:29:42 +00:00
parent 6bf486e52b
commit f980be8e28
14 changed files with 520 additions and 0 deletions

View file

@ -0,0 +1,28 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreCategoryRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return $this->user() && $this->user()->email === config('app.admin_email');
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
return [
'name' => 'required|string|max:255|unique:categories,name',
];
}
}