承接 amjadiqbal/laravel-driver-js 相关项目开发

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

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

amjadiqbal/laravel-driver-js

Composer 安装命令:

composer require amjadiqbal/laravel-driver-js

包简介

A professional Laravel wrapper for Driver.js. Easily create interactive product tours, feature highlights, and user onboarding flows using a fluent PHP API.

README 文档

README

Laravel Driver.js

License Packagist Version Downloads CI Code Style Static Analysis Coverage Release PHP Laravel Driver.js Tests

amjadiqbal/laravel-driver-js

Professional Laravel wrapper for Driver.js (v1.3+). Easily create interactive product tours, feature highlights, and user onboarding flows using a fluent PHP API.

  • SEO: Laravel product tours, interactive onboarding, feature highlights, guided walkthroughs, Driver.js for Laravel
  • Website: https://driverjs.com

IssuesInstallUsageAPIConfig

Requirements

  • PHP ^8.2
  • Laravel 10 or 11
  • Driver.js v1.3+

Installation

composer require amjadiqbal/laravel-driver-js
php artisan vendor:publish --tag=driver-js-config
php artisan vendor:publish --tag=driver-js-views

Features

  • Fluent PHP API mirroring Driver.js options and actions
  • Blade component for quick start
  • Config publishing with sensible defaults and CDN control
  • Callback wiring from PHP config to global JS functions
  • Pest tests via Orchestra Testbench
  • GitHub Actions CI and Laravel Pint code style

Usage

Fluent API

use AmjadIqbal\DriverJS\Facades\Driver;

$tour = Driver::make()
    ->allowClose(true)
    ->overlayColor('rgba(0,0,0,0.6)')
    ->addStep('#selector', 'Title', 'Description')
    ->addStep('.cta', 'Get Started', 'Click here to begin')
    ->drive();

$json = $tour->toJson();

Blade Component

<x-driver-js :steps="$steps" :config="['overlayColor' => 'rgba(0,0,0,0.6)']" />

Where $steps is an array:

$steps = [
    [
        'element' => '#selector',
        'popover' => [
            'title' => 'Title',
            'description' => 'Description',
        ],
    ],
];

Configuration

config/driver-js.php

return [
    'cdn_js' => 'https://unpkg.com/driver.js/dist/driver.min.js',
    'cdn_css' => 'https://unpkg.com/driver.js/dist/driver.min.css',
    'allowClose' => true,
    'overlayColor' => 'rgba(0, 0, 0, 0.5)',
    'opacity' => 0.6,
];

You can override any of these values per-tour via the Blade :config prop or by constructing a builder with initial config: Driver::make(['overlayColor' => '...']).

CDN keys (cdn_js, cdn_css) are used by the Blade component to load assets and are not forwarded to the Driver constructor.

Methods Mapping

Fluent Method Driver.js Option / Action Notes
allowClose(bool) allowClose Enable closing overlay
overlayColor(string) overlayColor RGBA or HEX
opacity(float) opacity Overlay opacity
set(key, value) any config key Direct set
addStep(selector, title, description, options) defineSteps -> step Popover title/description
defineSteps(array) defineSteps Bulk steps
drive() drive Start tour
highlight(selector) highlight Highlight element
moveNext() moveNext Next step
movePrevious() movePrevious Previous step
destroy() destroy Destroy tour
onHighlighting(handler) onHighlighting callback Provide global callback name

Blade Component Props

  • steps: array of Driver.js steps (as shown above)
  • config: array of overrides; merged with config('driver-js')

Callbacks

  • Provide callback names as strings, e.g. onHighlighting('onHighlight')
  • Ensure a matching global function exists: window.onHighlight = function (element) { ... }
  • The component resolves names to window functions before initializing Driver

Step Options

  • The addStep method supports an options array to pass step-level options supported by Driver.js (e.g., popover position, padding). These are forwarded as-is to the step object.

Documentation

  • API Docs: https://driverjs.com
  • YouTube: Tutorials and walkthroughs on product tours and onboarding
  • DEV Community: Implementation guides and tips

CI & Code Style

  • Tests: GitHub Actions workflow runs Pest on supported PHP versions
  • Code Style: Laravel Pint workflow validates formatting (non-mutating with --test)
  • Local commands:
composer test
composer lint

License

MIT

amjadiqbal/laravel-driver-js 适用场景与选型建议

amjadiqbal/laravel-driver-js 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 02 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「laravel package」 「onboarding」 「driverjs」 「Fluent API」 「Driver.js」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 amjadiqbal/laravel-driver-js 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 amjadiqbal/laravel-driver-js 我们能提供哪些服务?
定制开发 / 二次开发

基于 amjadiqbal/laravel-driver-js 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-23