Laravel-Backpack / theme-tabler

UI for Backpack v6 that uses Tabler and Bootstrap v5.
MIT License
26 stars 14 forks source link

[v6][Bug] Once config file is published, commands no longer work #68

Closed tabacitu closed 1 year ago

tabacitu commented 1 year ago

After having installed theme-tabler and publishing the config, I can no longer run artisan commands. If I try to do that, even php artisan optimize:clear, I get a big fat error in the terminal,

In UrlGenerator.php line 121: Illuminate\Routing\UrlGenerator::__construct(): Argument # 2 ($request) must be of type Illuminate\Http\Request, null given, called in /Users/tabacitu/Code/bp-v6b-fresh-2023-06-12/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php on line 67

which I’ve tracked down to be because of the theme-tabler config file, specifically line 59 where we use the url() helper.

I don’t think we can do that. And we can’t use the backpack_url() helper either because then we’d get “_Call to undefined function backpackurl()”.

So the only thing we CAN do, I think, is to turn the “urlsUsingOverLapEffect” config in theme-tabler.php from a list of FULL urls to a list of URLs that we will pass to url(). That should allow us to do the same thing, without triggering this error.

tabacitu commented 1 year ago

Note: this functionality is completely removed in https://github.com/Laravel-Backpack/theme-tabler/pull/60 - so if that gets merged, this problem goes away.

tabacitu commented 1 year ago

I've just merged https://github.com/Laravel-Backpack/theme-tabler/pull/60 so this issue goes away 🎉

st-patricks-day-rainbow-gif-by-tipsyelvescom