---
title: "lint/laravel/prefer-callable-route-action"
pagination: false
---

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

<RuleId id="lint/laravel/prefer-callable-route-action" />

Not in any preset. Needs the [`laravel` extension](/docs/configuration/pun-toml#extensions). Unsafe fix: it can change behavior.

## What it does

Use PHP callable syntax instead of string syntax for controller route declarations.

## Configuration

```toml title="pun.toml"
[lint.rules]
"laravel/prefer-callable-route-action" = "error"
```

To skip it in some files or lines, add an [override](/docs/configuration/pun-toml#lint) or an [ignore comment](/docs/configuration/ignore-comments).

## Replaces

- [`RouteActionCallable`](https://getrector.com/rule-detail/route-action-callable-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)
