PHP code example of vitisstudio / filament-hover-sidebar
1. Go to this page and download the library: Download vitisstudio/filament-hover-sidebar library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vitisstudio / filament-hover-sidebar example snippets
use Filament\Support\Icons\Heroicon;
HoverSidebarPlugin::make()
->unpinnedIcon(Heroicon::OutlinedBars3)
->pinnedIcon('heroicon-s-x-mark')
it('expands the sidebar on hover without moving the content', function () {
$page = visit('/admin');
$before = $page->script('document.querySelector(".fi-main-ctn").getBoundingClientRect().left');
$page->hover('#fi-main-sidebar')
->waitForText('Dashboard')
->assertScript(
'document.querySelector(".fi-main-ctn").getBoundingClientRect().left',
$before,
);
});