app/Http/Requests/AssetStoreRequest.php
/**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
Get the validation rules that apply to the request.
@return array
Get the validation rules that apply to the request . @return array
public function rules()
    {
        return [
            'asset_name' => ['string', 'required', new LatinName()],
            'specific' => 'string|required',
            'installed_date' => 'date|required',
            'state_key' => [
                'string', 'required',
                Rule::in(Asset::getStoreRequestStates())
            ],
            'category_id' => 'integer|required|exists:categories,id'
        ];
    }
public function rules ( ) { return [ 'asset_name' => [ 'string' , 'required' , new LatinName ( ) ] , 'specific' => 'string|required' , 'installed_date' => 'date|required' , 'state_key' => [ 'string' , 'required' , Rule :: in ( Asset :: getStoreRequestStates ( ) ) ] , 'category_id' => 'integer|required|exists:categories,id' ] ; }
Get the validation rules that apply to the request.
Get the validation rules that apply to the request .