<?php

namespace Modules\Auction\Http\Requests;

use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;
use Modules\Core\Entities\SpecialUser;

class CheckSpecialuser extends FormRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            //
        ];
    }

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        $specialuser=SpecialUser::pluck('user_id')->toArray();

        $id=Auth::user()->id;

        if(in_array($id,$specialuser)){
            return true;
        }else{
            return false;
        }
    }
}
