genealabs/laravel-multi-step-progressbar
Composer 安装命令:
composer require genealabs/laravel-multi-step-progressbar
包简介
README 文档
README
Version Compatibility
| Laravel | PHP | Package |
|---|---|---|
| 10.x | 8.2-8.5 | 1.x |
| 11.x | 8.2-8.5 | 1.x |
| 12.x | 8.2-8.5 | 1.x |
| 13.x | 8.2-8.5 | 1.x |
Installation
composer require genealabs/laravel-multi-step-progressbar
Implementation
The progress-bar is implemented via a Blade component:
<x-multi-step-progressbar
:model="$record"
:stepData="$stepData"
></x-multi-step-progressbar>
Model
The $record model represents the model that stores the information submitted in the various forms traversed. It will be passed into each view of the steps defined in $stepData and can be used to fill in the forms on each step. What it exactly contains is completely up to you.
Step Data
$stepData is a collection of ProgressbarItem model instances.
Data Points
Each step has the following properties:
- step: the number of the step, presented in sequence.
- url: the URL of the view to load for the given step.
- title: will be displayed on the active step in the progress-bar. Leave blank to not show anything.
- description: will be displayed on the active step in the progress-bar. Leave blank to not show anything.
- canJumpAhead: designates if the user can jump to the step once it has been filled out.
Collection
You can create this as follows:
$stepData = collect() ->push((new ProgressbarItem)->fill([ "step" => 1, "url" => route("wizards.record-analysis.edit", ["record" => $record, "step" => "1"]), "title" => "Create Document", "description" => "", "canJumpAhead" => true, ])) ->push((new ProgressbarItem)->fill([ "step" => 2, "url" => route("wizards.record-analysis.edit", ["record" => $record, "step" => "2"]), "title" => "Search Sources", "description" => "", "canJumpAhead" => (bool) $record->title, ])) ->push((new ProgressbarItem)->fill([ "step" => 3, "url" => route("wizards.record-analysis.edit", ["record" => $record, "step" => "3"]), "title" => "Create Source", "description" => "", "canJumpAhead" => ($record->source || $record->wherein), ])) // ...
Configuration
<?php return [ "sprites" => [ "hidden" => [ "bar" => "", ], // not previously visited step "unvisited" => [ "bar" => asset("images/assets/progress-bar/unactivated-bar.png"), "middle-pip" => asset("images/assets/progress-bar/unactivated-middle.png"), "last-pip" => asset("images/assets/progress-bar/unactivated-end.png"), ], // previously visited step "visited" => [ "first-pip" => asset("images/assets/progress-bar/activated-start.png"), "bar" => asset("images/assets/progress-bar/activated-bar.png"), "middle-pip" => asset("images/assets/progress-bar/activated-middle.png"), "last-pip" => asset("images/assets/progress-bar/activated-end.png"), ], // current step, and previously visited "active" => [ "first-pip" => asset("images/assets/progress-bar/active-current-start.png"), "middle-pip" => asset("images/assets/progress-bar/active-activated-middle.png"), "last-pip" => asset("images/assets/progress-bar/active-current-end.png"), ], // current and max visited step "max-active" => [ "first-pip" => asset("images/assets/progress-bar/active-current-start.png"), "middle-pip" => asset("images/assets/progress-bar/active-current-middle.png"), "last-pip" => asset("images/assets/progress-bar/active-current-end.png"), ], // max step, not current, previously visited "max-visited" => [ "middle-pip" => asset("images/assets/progress-bar/activated-current-middle.png"), "last-pip" => asset("images/assets/progress-bar/activated-current-end.png"), ], ] ];
genealabs/laravel-multi-step-progressbar 适用场景与选型建议
genealabs/laravel-multi-step-progressbar 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 276.89k 次下载、GitHub Stars 达 63, 最近一次更新时间为 2020 年 06 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 genealabs/laravel-multi-step-progressbar 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 genealabs/laravel-multi-step-progressbar 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 276.89k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 63
- 点击次数: 18
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-06-19
