lopatin96 / laravel-navigation
This package is abandoned and no longer maintained.
No replacement package was suggested.
Laravel navigation
Package info
github.com/lopatin96/laravel-navigation
Language:Blade
pkg:composer/lopatin96/laravel-navigation
1.0.50
2025-02-15 13:52 UTC
Requires
- php: >=8.0
- lopatin96/laravel-lang-switcher: ^1.0
Requires (Dev)
- orchestra/testbench: ^8.0
This package is auto-updated.
Last update: 2025-03-15 07:02:16 UTC
README
View
Header
Replace content of resource/views/layouts/header.blade.php with:
@include('laravel-navigation::navigation.header')
and add imports to resources/js/app.js:
import '../../vendor/lopatin96/laravel-navigation/resources/js/anchor-scroller'; import '../../vendor/lopatin96/laravel-navigation/resources/js/header-links-hider';
Footer
Replace content of resource/views/layouts/footer.blade.php with:
@include('laravel-navigation::navigation.footer')
Navigation-menu
Replace content of resource/views/navigation-menu.blade.php with:
@include('laravel-navigation::navigation.navigation-menu')
Profile
Replace content of resource/views/profile/show.blade.php with:
@include('laravel-navigation::navigation.settings')
and add gates to app/Providers/AppServiceProvider.php:
public function boot(): void { … Gate::define('admin_area', static function (User $user) { return $user->isAdmin(); }); Gate::define('pro_area', static function (User $user) { return $user->subscribed(); }); Gate::define('true_area', static function (User $user) { return true; }); Gate::define('false_area', static function (User $user) { return false; }); }
Publishing
Localization
php artisan vendor:publish --tag="laravel-navigation-lang"
Views
php artisan vendor:publish --tag="laravel-navigation-views"
Config
php artisan vendor:publish --tag="laravel-navigation-config"