Optimize view paths for module views in theme folder (#1081)
* override \Igaster\LaravelTheme\themeViewFinder as a workaround until PR#133 in igaster/laravel-theme is merged * fixup code style * further code style fix Co-authored-by: Andreas Palm <ap@ewsp.de>
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Services\ModuleService;
|
||||
use App\Support\ThemeViewFinder;
|
||||
use App\Support\Utils;
|
||||
use Illuminate\Pagination\Paginator;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
@@ -23,6 +24,14 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->singleton('view.finder', function ($app) {
|
||||
return new ThemeViewFinder(
|
||||
$app['files'],
|
||||
$app['config']['view.paths'],
|
||||
null
|
||||
);
|
||||
});
|
||||
|
||||
// Only load the IDE helper if it's included and enabled
|
||||
if (config('app.debug') === true) {
|
||||
/* @noinspection NestedPositiveIfStatementsInspection */
|
||||
|
||||
Reference in New Issue
Block a user