Your IP : 216.73.216.91


Current Path : /var/www/html/LLCF-APP/app/Http/Requests/
Upload File :
Current File : /var/www/html/LLCF-APP/app/Http/Requests/UpdateCourseRequest.php

<?php

namespace App\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;

class UpdateCourseRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return auth()->guard('admin')->check();
    }

    /**
     * Get the validation rules that apply to the request.
     */
    public function rules(): array
    {
        return [
            'name' => 'required|string|max:255|unique:courses,name,' . $this->route('id'),
        ];
    }
}