3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-02-05 11:25:52 +00:00
Files
snipe-it/app/Http/Requests/StoreDepartmentRequest.php
2025-05-21 11:44:54 -05:00

33 lines
737 B
PHP

<?php
namespace App\Http\Requests;
use App\Models\Department;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Gate;
class StoreDepartmentRequest extends ImageUploadRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return Gate::allows('create', new Department);
}
/**
* Get the validation rules that apply to the request.
*
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array<mixed>|string>
*/
public function rules(): array
{
$modelRules = (new Department)->getRules();
return array_merge(
$modelRules,
);
}
}