承接 anaseqal/nova-sidebar-icons 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

anaseqal/nova-sidebar-icons

最新稳定版本:0.0.3

Composer 安装命令:

composer require anaseqal/nova-sidebar-icons

包简介

A Laravel Nova tool.

README 文档

README

Set icons for resources in sidebar.

screenshot

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require anaseqal/nova-sidebar-icons

Publish navigation view file:

php artisan vendor:publish --provider="Anaseqal\NovaSidebarIcons\ToolServiceProvider" --force

Register the tool in NovaServiceProvider:

use Anaseqal\NovaSidebarIcons\NovaSidebarIcons; ... public function tools() { return [ new NovaSidebarIcons, ... ]; }

Usage

Set the icon in your Nova resource, for example:

/**  * The icon of the resource.  *  * @return string  */ public static function icon() { // Assuming you have a blade file containing an image // in resources/views/vendor/nova/svg/icon-user.blade.php return view('nova::svg.icon-user')->render(); }

This is the recommended approach. In the example above we have used a blade file containing an svg, but if you'd want to it's is possible return the entire svg string

Examples of other approaches

// By using an image tag public static function icon() { return '<img src="/path/to/image.svg" />'; } // Or simply return it as a string public static function icon() { return '<svg class="sidebar-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">  <path fill="var(--sidebar-icon)" d="M4.06 13a8 8 0 0 0 5.18 .... e.t.c."/>  </svg>'; } 

Backwards compatibility

Please note that this package used to use a static $icon property on the resource. This has been replaced with the static icon method. The icon property is still supported to preserve backwards compatibility.

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 49
  • Watchers: 2
  • Forks: 5
  • 开发语言: CSS

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固