slash2nl/nova-back-button
最新稳定版本:v2.1.0
Composer 安装命令:
composer require slash2nl/nova-back-button
包简介
A Laravel Nova card to display a back button.
README 文档
README
Adds a card that implements a back button to Nova, the content can be fully customized. The url is called through the router and without a url set a history.go(-1) is called.
Installation
You can install the package in to a Laravel app that uses Nova via composer:
- Install version ^1.0 for Laravel Nova ^1.0|^2.0|^3.0
- Install version ^2.0 for Laravel Nova ^4.0
composer require slash2nl/nova-back-button
Usage
use SLASH2NL\NovaBackButton\NovaBackButton; public function cards() { return [ (new NovaBackButton()) ->onlyOnDetail(), (new NovaBackButton()) ->onlyOnDetail() ->width('1/3') ->markdown('# Hello World!'), (new NovaBackButton()) ->onlyOnDetail() ->width('1/3') ->view('partials.back-button') ->url(sprintf('%s/resources/%s/%d', config('nova.path'), User::uriKey(), \App\Models\User::first()->id)), ]; }
Options
- Set content, by default a back svg is used.
->html('<h1>Hello!</h1>'): Set HTML or plain content.->markdown('# Hello!'): Set Markdown content that will be converted into HTML.->view('path.to.view', []): Specify blade view file and optionally pass an array of data to view.
- Styling
->center(false): Center card's content.falseby default.->withoutCardStyles(true): Whether to use standard Nova Card styles for a card (background, padding, etc).falseby default.->forceFullWidth(true): Force the card to be full width. A fix for nova cards order.
Source
This package was created with the help of: https://github.com/InteractionDesignFoundation/nova-html-card
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 198.6k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 18
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-05-31

