*/ public function all($keys = null): array { $request = parent::all($keys); $request['id'] = $this->route('id'); return $request; } /** * Determine if the user is authorized to make this request. */ public function authorize(): bool { return true; } /** * Get the validation rules that apply to the request. * * @return array|string> */ public function rules(): array { return [ 'id' => 'required|integer|min:0', ]; } }