invoiceninja/app/Http/Requests/CreateProductRequest.php
David Bomba 653a8f2412
Revert "fix for tests (#2153)" (#2154)
This reverts commit 1aa546b13e0b2ed9eb76d9a6f1ca13ab86cb747a.
2018-06-08 15:37:36 +10:00

29 lines
517 B
PHP

<?php
namespace App\Http\Requests;
class CreateProductRequest extends ProductRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return $this->user()->can('create', ENTITY_PRODUCT);
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'product_key' => 'required',
];
}
}