* upgrade to laravel 13 * phpstan * rollback to symfony 7.4 * fix: ModuleService merge * refactor: new rector rules
32 lines
519 B
PHP
32 lines
519 B
PHP
<?php
|
|
|
|
namespace App\Contracts;
|
|
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class FormRequest extends \Illuminate\Foundation\Http\FormRequest
|
|
{
|
|
/**
|
|
* Authorized by default
|
|
*/
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [];
|
|
}
|
|
|
|
/**
|
|
* Set a given column as being unique
|
|
*/
|
|
public function unique($table): array
|
|
{
|
|
return [
|
|
Rule::unique($table)->ignore($this->id, 'id'),
|
|
];
|
|
}
|
|
}
|