File: /www/wwwroot//www.shooperm.com/Modules/Product/Http/Requests/AttributeFormRequest.php
<?php
namespace Modules\Product\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;
class AttributeFormRequest extends FormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'name' => 'required|unique:attributes,name,'.$this->id,
"status" => "required",
];
}
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
}