Installation Guide 🚀
Welcome to the installation guide for Laravel Driver.js! By following these simple steps, you'll have Driver.js tours and highlights running in your Laravel application in no time.
Requirements
- PHP 8.2 or higher
- Laravel 12.0 or 13.0
Step 1: Composer Magic ✨
First, let's kick things off with some Composer magic. Open your terminal and run the following command:
composer require realrashid/laravel-driverjsThis command will fetch and install Laravel Driver.js along with all its dependencies. The package uses Laravel's auto-discovery feature, so the service provider and facade are registered automatically.
Step 2: Set Up the Foundation 🏗️
Next, we'll publish the Laravel Driver.js scaffolding:
php artisan driverjs:installThis step publishes the configuration file to config/driverjs.php and gives you full control over the package's behavior. If you want to republish the files (overwriting any changes you've made), use the --force flag:
php artisan driverjs:install --forceStep 3: Include the Assets 🎨
Add the @driverjsAssets Blade directive to your layout's <head> section to load the Driver.js CSS and JavaScript from the CDN:
<head>
<!-- Your other head content -->
@driverjsAssets
</head>That's it! The Driver.js library is now available on every page of your application.
Step 4: Explore the Power! 💪
Congratulations! Laravel Driver.js is now seamlessly integrated into your Laravel application. You're ready to create beautiful product tours, feature highlights, and contextual help — all from PHP.
Here's a quick taste of what you can do:
use RealRashid\LaravelDriverJs\Facades\DriverJs;
DriverJs::tour('onboarding')
->showProgress()
->step('#header', 'Welcome!', 'This is the main header.')
->step('#nav', 'Navigation', 'Use these links to get around.')
->step('#content', 'Content', 'Your main content lives here.')
->render();You're on the path to revolutionizing your user onboarding. Delve into the documentation to uncover advanced features and take your Laravel Driver.js experience to the next level.
Happy coding! 🚀
Made with ❤️ from Pakistan