PHPackages                             jaysontemporas/page-bookmarks - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. jaysontemporas/page-bookmarks

ActiveLibrary

jaysontemporas/page-bookmarks
=============================

v3.0.1(2mo ago)102.0k↓32.1%6[1 PRs](https://github.com/jayson-temporas/page-bookmarks/pulls)MITPHP

Since Jun 21Pushed 2mo agoCompare

[ Source](https://github.com/jayson-temporas/page-bookmarks)[ Packagist](https://packagist.org/packages/jaysontemporas/page-bookmarks)[ RSS](/packages/jaysontemporas-page-bookmarks/feed)WikiDiscussions 5.x Synced 1mo ago

READMEChangelog (8)Dependencies (8)Versions (12)Used By (0)

Page Bookmarks
==============

[](#page-bookmarks)

A simple bookmark management system for Laravel Filament applications. This package provides an intuitive way for users to save, organize, and access bookmarks directly within your Admin panel.

Features
--------

[](#features)

- 📚 **Smart Bookmark Creation**: Automatically captures the current page URL and title
- 📁 **Folder Organization**: Organize bookmarks into custom folders
- 🔍 **Real-time Search**: Search through your bookmarks with instant filtering
- ⌨️ **Keyboard Shortcuts**: Quick bookmark creation shortcut `Cmd+Shift+B` on Mac or `Ctrl+Shift+B` on Windows/Linux
- 👤 **User-specific**: Each user has their own private bookmarks
- 🎯 **Customizable**: Configurable icons, render hooks, table names

Screenshots
-----------

[](#screenshots)

### Add Bookmark

[](#add-bookmark)

[![Bookmark Manager](assets/add_bookmark.png)](assets/add_bookmark.png)

### View Bookmarks

[](#view-bookmarks)

[![Bookmark Viewer](assets/view_bookmark.png)](assets/view_bookmark.png)

Requirements
------------

[](#requirements)

- PHP 8.3+
- Laravel 11+
- Filament 3, 4, and 5

Installation
------------

[](#installation)

**Install the package via Composer:**

### For Filament 3

[](#for-filament-3)

```
composer require jaysontemporas/page-bookmarks:"^1.0"
```

### For Filament 4

[](#for-filament-4)

```
composer require jaysontemporas/page-bookmarks:"^2.0"
```

### For Filament 5

[](#for-filament-5)

```
composer require jaysontemporas/page-bookmarks:"^3.0"
```

**Publish and run the installation command:**

```
php artisan page-bookmarks:install
```

This command will:

- Publish the configuration file
- Publish and run the database migrations
- Publish the assets

Configuration
-------------

[](#configuration)

### Basic Configuration

[](#basic-configuration)

The package configuration file is located at `config/page-bookmarks.php`. Here are the main configuration options:

```
return [
    // Table names (customizable to avoid conflicts)
    'tables' => [
        'bookmarks' => 'bookmarks',
        'bookmark_folders' => 'bookmark_folders',
    ],

    // User model for bookmark associations
    'models' => [
        'user' => \App\Models\User::class,
    ],

    // Icons used throughout the interface
    'icons' => [
        'add_bookmark' => 'heroicon-o-folder-plus',
        'view_bookmarks' => 'heroicon-o-bookmark',
        'bookmark_item' => 'heroicon-o-bookmark',
        'folder' => 'heroicon-o-folder',
        'search' => 'heroicon-o-magnifying-glass',
        'delete' => 'heroicon-o-trash',
        'chevron_down' => 'heroicon-o-chevron-down',
        'empty_state' => 'heroicon-o-bookmark',
    ],

    // Render hook positions in Filament
    'render_hooks' => [
        'add_bookmark' => \Filament\View\PanelsRenderHook::GLOBAL_SEARCH_AFTER,
        'view_bookmarks' => \Filament\View\PanelsRenderHook::GLOBAL_SEARCH_AFTER,
    ],
];
```

This package utilizes Filament's theming system, so you'll need to set up a custom theme to properly style all components.

> \[!NOTE\] Before proceeding, ensure you have configured a custom theme if you're using Filament Panels. Check the Filament documentation on themes for detailed instructions. This step is required for both the Panels Package and standalone Forms package.

[Filament 3](https://filamentphp.com/docs/3.x/panels/themes)[Filament 4](https://filamentphp.com/docs/4.x/styling/overview#creating-a-custom-theme)[Filament 5](https://filamentphp.com/docs/5.x/styling/overview#creating-a-custom-theme)

### Filament 3

[](#filament-3)

To properly compile all the package styles, update your Tailwind configuration by adding the package's view paths:

```
// In your resources/css/filament/admin/tailwind.config.js
// where admin is the name of your panel
module.exports = {
    content: [
        // Include the package's blade templates
        './vendor/jaysontemporas/page-bookmarks/resources/**/*.blade.php',
        // Your existing paths...
    ],
    // The rest of your Tailwind config
};
```

### Filament 4 and 5

[](#filament-4-and-5)

Add the plugin's views to your theme css file.

```
@source '../../../../vendor/jaysontemporas/page-bookmarks/resources/**/*.blade.php';
```

Usage
-----

[](#usage)

### Adding the HasBookmarks Trait

[](#adding-the-hasbookmarks-trait)

To enable bookmark functionality for your User model, add the `HasBookmarks` trait:

```
