mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-11 05:32:39 +01:00
40 lines
659 B
PHP
40 lines
659 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Requests\Payment;
|
||
|
|
||
|
use App\Http\Requests\Request;
|
||
|
use App\Models\Payment;
|
||
|
|
||
|
class EditPaymentRequest extends Request
|
||
|
{
|
||
|
/**
|
||
|
* Determine if the user is authorized to make this request.
|
||
|
*
|
||
|
* @return bool
|
||
|
*/
|
||
|
|
||
|
public function authorize()
|
||
|
{
|
||
|
return auth()->user()->can('edit', $this->payment);
|
||
|
}
|
||
|
|
||
|
public function rules()
|
||
|
{
|
||
|
$rules = [];
|
||
|
|
||
|
return $rules;
|
||
|
}
|
||
|
|
||
|
|
||
|
public function sanitize()
|
||
|
{
|
||
|
$input = $this->all();
|
||
|
|
||
|
//$input['id'] = $this->encodePrimaryKey($input['id']);
|
||
|
|
||
|
//$this->replace($input);
|
||
|
|
||
|
return $this->all();
|
||
|
}
|
||
|
|
||
|
}
|