style updates

This commit is contained in:
Mark Gregory
2026-07-24 14:59:44 +01:00
parent 24ab771cd3
commit dd23205d0b
482 changed files with 7173 additions and 1435 deletions
@@ -17,6 +17,7 @@ final class ProductController
public function store(StoreProductRequest $request): RedirectResponse
{
Product::query()->create($request->validated());
return back()->with('status', 'Product created.');
}
}
@@ -6,6 +6,13 @@ use Illuminate\Foundation\Http\FormRequest;
final class StoreProductRequest extends FormRequest
{
public function authorize(): bool { return $this->user() !== null; }
public function rules(): array { return ['name' => ['required', 'string', 'max:255'], 'is_active' => ['sometimes', 'boolean']]; }
public function authorize(): bool
{
return $this->user() !== null;
}
public function rules(): array
{
return ['name' => ['required', 'string', 'max:255'], 'is_active' => ['sometimes', 'boolean']];
}
}