PHP code example of tomatophp / filament-bookmarks-menu

1. Go to this page and download the library: Download tomatophp/filament-bookmarks-menu 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/ */

    

tomatophp / filament-bookmarks-menu example snippets


->plugin(\TomatoPHP\FilamentBookmarksMenu\FilamentBookmarksMenuPlugin::make())

use TomatoPHP\FilamentBookmarksMenu\Filament\Actions\BookmarkAction;

protected function getHeaderActions(): array
{
    return [
        BookmarkAction::make()
    ];
}


use TomatoPHP\FilamentBookmarksMenu\Filament\Tables\BookmarkAction;

public function table(Table $table): void
{
    $table->actions([
        BookmarkAction::make()
    ]);
}

use TomatoPHP\FilamentBookmarksMenu\Filament\Tables\BookmarkBulkAction;
use TomatoPHP\FilamentBookmarksMenu\Filament\Tables\BookmarkBulkClearAction;

public function table(Table $table): void
{
    $table->bulkActions([
        Tables\Actions\BulkActionGroup::make([
            BookmarkBulkAction::make(),
            BookmarkBulkClearAction::make()
        ]),
    ]);
}

use TomatoPHP\FilamentBookmarksMenu\Facades\FilamentBookmarksMenu;
use TomatoPHP\FilamentBookmarksMenu\Services\Contracts\BookmarkType;
        

public function boot()
{
    FilamentBookmarksMenu::register([
        BookmarkType::make('hashtags')->label('Hashtags')->panel('employee'),
        BookmarkType::make('folder')->label('Folders'),
    ]);
}
bash
php artisan filament-bookmarks-menu:install
bash
php artisan vendor:publish --tag="filament-bookmarks-menu-config"
bash
php artisan vendor:publish --tag="filament-bookmarks-menu-views"
bash
php artisan vendor:publish --tag="filament-bookmarks-menu-lang"
bash
php artisan vendor:publish --tag="filament-bookmarks-menu-migrations"