Viewing File: /home/ubuntu/walnutminds-ecom-backend-base/app/Http/Requests/Admin/Review/ReviewGetRequest.php

<?php

namespace App\Http\Requests\Admin\Review;

use Illuminate\Foundation\Http\FormRequest;

class ReviewGetRequest extends FormRequest
{
    /**
     * 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 [
            'review_id' => ['required', 'exists:reviews,id']
        ];
    }

    /**
     * Custom Validation Errors.
     *
     * @return array
     */
    public function messages()
    {
        return ['exists' => tr('review_not_found') ];
    }
}
Back to Directory File Manager