2019-10-03 05:21:24 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
2020-01-07 01:13:47 +01:00
|
|
|
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
|
2019-10-03 05:21:24 +02:00
|
|
|
*
|
|
|
|
* @license https://opensource.org/licenses/AAL
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Http\Requests\CompanyGateway;
|
|
|
|
|
|
|
|
use App\Http\Requests\Request;
|
|
|
|
use App\Models\Company;
|
|
|
|
|
|
|
|
class DestroyCompanyGatewayRequest extends Request
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Determine if the user is authorized to make this request.
|
|
|
|
*
|
|
|
|
* @return bool
|
|
|
|
*/
|
|
|
|
|
|
|
|
public function authorize()
|
|
|
|
{
|
2019-10-03 13:18:12 +02:00
|
|
|
return auth()->user()->isAdmin();
|
2019-10-03 05:21:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function rules()
|
|
|
|
{
|
|
|
|
$rules = [];
|
|
|
|
|
|
|
|
return $rules;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-12-20 12:23:09 +01:00
|
|
|
protected function prepareForValidation()
|
2019-10-03 05:21:24 +02:00
|
|
|
{
|
|
|
|
$input = $this->all();
|
|
|
|
|
|
|
|
//$input['id'] = $this->encodePrimaryKey($input['id']);
|
|
|
|
|
2019-12-20 12:23:09 +01:00
|
|
|
$this->replace($input);
|
2019-10-03 05:21:24 +02:00
|
|
|
}
|
2019-12-30 22:59:12 +01:00
|
|
|
}
|