1. Go to this page and download the library: Download soufianelasmar/quicknote 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/ */
soufianelasmar / quicknote example snippets
use soufianelasmar\quicknote\FilamentQuickNotesPlugin;
$panel->plugins([
FilamentQuickNotesPlugin::make()
->visible(true),
]);
use soufianelasmar\quicknote\Traits\HasFilamentQuickNotes;
class User extends Authenticatable
{
use HasFilamentQuickNotes;
}
use Filament\View\PanelsRenderHook;
use soufianelasmar\quicknote\Enums\DeletionType;
use soufianelasmar\quicknote\Models\FilamentQuickNote;
return [
/*
|--------------------------------------------------------------------------
| Render hook position
|--------------------------------------------------------------------------
|
| Determines where the Quick Notes button appears inside the Filament panel.
| Any value from \Filament\View\PanelsRenderHook is valid.
|
| Common options:
| PanelsRenderHook::GLOBAL_SEARCH_BEFORE (default — left of the search bar)
| PanelsRenderHook::GLOBAL_SEARCH_AFTER
| PanelsRenderHook::TOPBAR_START
| PanelsRenderHook::TOPBAR_END
|
*/
'position' => PanelsRenderHook::GLOBAL_SEARCH_BEFORE,
/*
|--------------------------------------------------------------------------
| Database table name
|--------------------------------------------------------------------------
|
| Override this if the default table name conflicts with your existing schema.
|
*/
'table_name' => 'filament_quick_notes',
/*
|--------------------------------------------------------------------------
| Quick Notes model
|--------------------------------------------------------------------------
|
| You may swap in your own model as long as it extends FilamentQuickNote
| or implements the same interface / fillable attributes.
|
*/
'quick_notes_model' => FilamentQuickNote::class,
/*
|--------------------------------------------------------------------------
| Note deletion method
|--------------------------------------------------------------------------
| Determines how notes are deleted when the user clicks "Delete".
| Options:
| - DeletionType::SOFT (default) — notes are soft-deleted and can be restored later.
| - DeletionType::FORCE — notes are permanently deleted immediately.
|
*/
'deletion_type' => DeletionType::SOFT,
];