---
title: "lint/laravel/no-default-authorize"
pagination: false
---

{/* Generated by scripts/gen-rule-docs.py. Edit mapping.toml, not this file. */}

<RuleId id="lint/laravel/no-default-authorize" />

In the [`code-quality`](/docs/rules/sets/code-quality) set. Safe fix. Runs when laravel is installed. **Planned: not in Pun yet.** Enabling it is a config error.

## What it does

Remove the authorize() method from FormRequest classes when it only returns true, as passesAuthorization() defaults to true when the method does not exist

## Replaces

- [`RemoveDefaultAuthorizeTrueFromFormRequest`](https://getrector.com/rule-detail/remove-default-authorize-true-from-form-request-rector) (rector-laravel)

[More lint/laravel rules](/docs/rules/lint/laravel) · [Edit this page](https://github.com/shipfastlabs/pun/edit/main/crates/pun-config/rules/mapping.toml)
