%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/diaspora/api/app/Http/Requests/Api/v1/Events/
Upload File :
Create Path :
Current File : /var/www/html/diaspora/api/app/Http/Requests/Api/v1/Events/CreateEventRequest.php

<?php

namespace App\Http\Requests\Api\v1\Events;

use App\Http\Requests\BaseRequest;
use App\Models\Event;

class CreateEventRequest extends BaseRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'for'            => 'required|string|in:' . Event::getAvailableModulesWithEvents(),
            'title'          => 'required|string',
            'featured_image' => 'required|string',
            'location'       => 'required|string',
            'description'    => 'required|string',
            'when'           => 'required|date',
            'video_type'     => 'string|nullable',
            'video_url'      => 'nullable|required_with:video_type',
        ];
    }
}

Zerion Mini Shell 1.0