invoiceninja/app/Http/Requests/UpdateCreditRequest.php

29 lines
509 B
PHP
Raw Normal View History

2017-01-30 21:40:43 +02:00
<?php
namespace App\Http\Requests;
2016-11-30 20:21:50 +02:00
class UpdateCreditRequest extends CreditRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return $this->user()->can('edit', $this->entity());
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
2017-05-30 13:56:51 +03:00
'amount' => 'positive',
2016-11-30 20:21:50 +02:00
];
}
}