lopatin96/laravel-navigation 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lopatin96/laravel-navigation

最新稳定版本:1.0.50

Composer 安装命令:

composer require lopatin96/laravel-navigation

包简介

Laravel navigation

README 文档

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"

统计信息

  • 总下载量: 8.97k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-04-18