Download the PHP package yacoubalhaidari/filament-tour without Composer

On this page you can find all versions of the php package yacoubalhaidari/filament-tour. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-tour

Gemini_Generated_Image_xwwnlrxwwnlrxwwn

Filament Tour

An interactive guided tour for the Filament admin panel powered by Shepherd.js.

This plugin adds a tour trigger button to the Filament user menu and lets you build a step‑by‑step walkthrough of your panel pages, with full control over colors, texts, and welcome/finish screens.

Features: Resources & custom pages · Livewire SPA navigation · Sidebar highlight + modal overlay · Custom welcome/finish · Progress resume · EN / AR / ID translations

Contents

🎥 Filament Tour – Video Demo

Filament Tour – Video Demo

Click the image to watch the full video on YouTube.


Requirements


Installation

Require the package via Composer:

Optionally publish the CSS/JS assets into your public directory (recommended in production so browsers load a stable copy):

This publishes:

The service provider auto‑registers assets from the package (resources/dist/filament-tour.js, falling back to resources/js/shepherd-tour.js). After upgrading the package, run php artisan filament:assets and hard‑refresh the browser (Ctrl+Shift+R).


Registering the Plugin

In your Filament PanelProvider, register the plugin and optionally customize the tour button and appearance.

Plugin Methods

All configuration methods are chainable on FilamentTourPlugin::make():

Color customization (all optional – values are used directly as CSS values and wired into CSS variables):

Custom welcome / finish steps:

Each step array supports at least:

Supported button actions: back, next, cancel, complete.


Defining Dynamic Tour Steps

Dynamic steps are collected automatically by TourStepCollector from:

Steps are sorted by getTourStepSort() (lower = earlier). The tour order is:

welcomeStep → dynamic steps → finishStep

On Resources

Add the trait to any resource you want to appear in the tour:

What the Trait Provides

HasTourSteps defines the following static methods (with sensible defaults):

The package collects these steps via TourStepCollector and passes them to the frontend as window.dynamicTourSteps.

For resources, the collector resolves the step URL with Resource::getUrl('index') so the tour can navigate to the list page when needed.

On Custom Pages

Use the same trait on a Filament Page class (must be registered on the panel):

For pages, the collector uses Page::getUrl() (no index route). getTourStepTitle() falls back to getNavigationLabel() when getModelLabel() is not available.


How Navigation Matching Works

The frontend tags sidebar items with data-tour="{stepId}" so Shepherd can highlight the correct menu entry.

Matching strategy (in order)

  1. URL path (recommended) – Each dynamic step includes a url. Links in the sidebar (.fi-sidebar-item-btn) whose href pathname matches that URL receive data-tour.
  2. Navigation label (fallback)TourStepCollector::getNavigationMap() builds { stepId => navigationLabel } from getNavigationLabel() on each resource/page. Sidebar text is matched against the label.

While the tour runs

Livewire SPA navigation

When a step belongs to another resource/page, the tour:

  1. Calls Livewire.navigate() to the step URL (if available).
  2. Waits for livewire:navigated.
  3. Re-applies data-tour attributes and waits for the target element in the DOM.
  4. Re-binds the modal overlay on the sidebar item.

This avoids stale DOM references after Filament replaces the page content.

Welcome & finish steps

Steps without attachTo (default welcome/finish, or your custom welcomeStep() / finishStep()) are centered and use a lighter experience: the full-screen dark overlay is hidden so only the tooltip card is shown.


Localization (en / ar / id)

The package ships with simple translation files that you can override in your app:

Each file contains default labels for the welcome/finish steps and button texts. You can override them in your own application like any other Laravel lang file and then map them into your custom welcomeStep() / finishStep() calls, for example:


Running the Tour

Progress persistence

The tour stores state in the browser:

Key Purpose
shepherd-tour-in-progress "true" while the tour is active
shepherd-tour-current-step Current step id (e.g. users, documents)
shepherd-tour-completed Set when the user finishes the tour
shepherd-tour-completed-at ISO timestamp of completion

If the user refreshes or Livewire navigates during a tour, the script can resume from shepherd-tour-current-step.

After complete or cancel

cleanupTourState() runs automatically:


Building Frontend Assets (package contributors)

If you modify resources/js/shepherd-tour.js, rebuild the bundle:

Output: resources/dist/filament-tour.js

Then publish to your app:


Troubleshooting

Highlight works on the first step only

  1. Run php artisan filament:assets and hard‑refresh the browser.
  2. Ensure getTourStepId() is unique across resources and pages.
  3. Ensure the resource has an index URL (or the page is navigable).
  4. Check the browser console for Tour target not found for step "...".
  5. Confirm sidebar labels match getNavigationLabel() or that the menu link href matches the step URL.

Wrong sidebar item active after the tour

This is handled by syncSidebarActiveState() on complete/cancel. If you use a custom sidebar, ensure menu links use standard Filament classes (.fi-sidebar-item, .fi-sidebar-item-btn) and correct href paths.

Custom welcome/finish still show a black screen

Use welcomeStep() / finishStep() without attachTo. Centered steps hide the modal overlay automatically.

Translations not applied to buttons in dynamic steps

Dynamic step buttons use __('filament-tour::filament-tour.buttons.*') from the collector. Publish or override lang files in your app under lang/vendor/filament-tour/ if needed.


License

Released under the MIT License.


All versions of filament-tour with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^3.0|^4.0|^5.0
spatie/laravel-package-tools Version ^1.15.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package yacoubalhaidari/filament-tour contains the following files

Loading the files please wait ...