29 lines
598 B
PHP
29 lines
598 B
PHP
<?php
|
|
|
|
namespace Modules\Activity\app\Http\Requests;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class CreateActivityRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*/
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'name' => 'required',
|
|
'status' => 'required',
|
|
'image' => 'sometimes|nullable|image|mimes:jpeg,png,jpg,gif',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*/
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
}
|