Verify, then rewrite
A table string becomes a model class only when the resolved model's own table provably equals it. A model with a mismatched $table or an overridden getTable() is left alone.
Rector rules that rewrite Laravel convention breaches instead of reporting them: naming, routing, migration safety, Eloquent relations and named arguments.
1 file with changes
===================
1) app/Http/Resources/Article.php:4
---------- begin diff ----------
@@ Line 4 @@
use Illuminate\Http\Resources\Json\JsonResource;
-class Article extends JsonResource
+class ArticleResource extends JsonResource
{
}
----------- end diff -----------
Applied rules:
* AddResourceSuffixRector
[OK] 1 file would have been changed (dry-run) by RectorInstall it as a dev dependency, enable a set, and dry-run before you apply.
composer require hihaho/rector-rules --dev
vendor/bin/rector process --dry-run