Laravel-Backpack / CRUD

Build custom admin panels. Fast!
https://backpackforlaravel.com
MIT License
3.12k stars 890 forks source link

[Feature] Accept classes on routes #5442

Closed promatik closed 8 months ago

promatik commented 8 months ago

WHY

This goes in line with what we do in Laravel.

BEFORE - What was wrong? What was happening before this PR?

Route::crud('calendar', 'CalendarCrudController');

AFTER - What is happening after this PR?

Route::crud('calendar', CalendarCrudController::class);

HOW

How did you achieve that, in technical terms?

Simple validation on CrudRouter class.

Is it a breaking change?

No, old strings are still available.


Maybe we should even deprecate the string method on v7.