PHP-087 / Beginner
FormRequest authorize() defaults to true
Why is this a problem?
Leaving the generated default code unchanged allows anyone to submit the request.
How to fix it
php
public function authorize(): bool { return $this->user()->can('update', $this->route('post')); }