2020-05-23 05:28:24 +02:00
|
|
|
<?php
|
|
|
|
/**
|
2020-09-06 11:38:10 +02:00
|
|
|
* Invoice Ninja (https://invoiceninja.com).
|
2020-05-23 05:28:24 +02:00
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @license https://opensource.org/licenses/AAL
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Http\Requests\PaymentTerm;
|
|
|
|
|
|
|
|
use App\Http\Requests\Request;
|
|
|
|
use App\Models\PaymentTerm;
|
|
|
|
|
2020-05-25 03:57:08 +02:00
|
|
|
class EditPaymentTermRequest extends Request
|
2020-05-23 05:28:24 +02:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
public function authorize()
|
|
|
|
{
|
|
|
|
return auth()->user()->isAdmin();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function rules()
|
|
|
|
{
|
|
|
|
$rules = [];
|
2020-09-06 11:38:10 +02:00
|
|
|
|
2020-05-23 05:28:24 +02:00
|
|
|
return $rules;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function prepareForValidation()
|
|
|
|
{
|
|
|
|
$input = $this->all();
|
|
|
|
|
|
|
|
//$input['id'] = $this->encodePrimaryKey($input['id']);
|
|
|
|
|
|
|
|
$this->replace($input);
|
|
|
|
}
|
|
|
|
}
|