нет, DI - это зло.
If you would like to provide your own policy discovery logic, you may register a custom callback using the Gate::guessPolicyNamesUsing method. Typically, this method should be called from the boot method of your application's AuthServiceProvider:
use Illuminate\Support\Facades\Gate;
Gate::guessPolicyNamesUsing(function ($modelClass) { // return policy class name... });
$value1 = 404;
$value2 = '404';
var_dump($value1 === 404);
var_dump((int)$value2 === 404);
var_dump($value2 === '404');
Подключил модуль, зарегал контроллер, дернул из модуля сервис, обвесил посредниками и все готово