eduardoarandah / backpacklogviewer

Integrate ArcaneDev/LogViewer in your Laravel-Backpack project
MIT License
25 stars 8 forks source link

Facade\Ignition\Exceptions\ViewException View [layout] not found #3

Closed nomadtechiemike closed 4 years ago

nomadtechiemike commented 4 years ago

\www\backpack2\resources\views\vendor\log-viewer\backpack_master.blade.php) error not found

eduardoarandah commented 4 years ago

man, I can't guess! 😂

can you elaborate?

nomadtechiemike commented 4 years ago

It will not load as it cannot find the blade file, even though the blade file is in the correct folder

pxpm commented 4 years ago

It should be \www\backpack2\resources\views\vendor\log-viewer\backpack\_master.blade.php

It's missing a "\" slash.

Also make sure you are not running Backpack v4.0 with this package.

Best, Pedro

TheROPFather commented 4 years ago

Also make sure you are not running Backpack v4.0 with this package.

Is there any plan to add support for Backpack 4.0?

I also have this issue.

ErrorException thrown with message "View [layout] not found. (View: /var/www/mysite/resources/views/vendor/log-viewer/backpack/_master.blade.php) (View: /var/www/mysite/resources/views/vendor/log- viewer/backpack/_master.blade.php)" image

TheROPFather commented 4 years ago

Is there any update on this?

@nomadtechiemike Did you find a solution?

eduardoarandah commented 4 years ago

Hello guys! I'm the package owner.

Haven't had time to check the issue.

I think backpack V4 changed the base layout name to layouts.top_left

This could potentially be fixed by changing the first line in blade files to:

@extends(backpack_view('layouts.top_left'))

If you could test it and make the pull request it would be awesome!!

How to quickly do it:

And then make the PR

Hope I can find the time to fix it myself

eduardoarandah commented 4 years ago

This issue is fixed.

Republish view files with:

php artisan vendor:publish --provider="EduardoArandaH\BackpackLogViewer\BackpackLogViewerServiceProvider" --force

Also, you can add a better sidebar link version with:

php artisan backpack:add-sidebar-content "<li class='nav-item'><a class='nav-link' href='{{route(\"log-viewer::logs.list\")}}'><i class='nav-icon fa fa-history'></i> {{ trans('Logs') }}</a></li>"