PHP code example of mstfkhzaal / filament-page-hints

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

    

mstfkhzaal / filament-page-hints example snippets


return [
    /**
     * Filament page table
     */
    'table_name' => 'filament_page_hints',
    /**
     * This is the icon of the hint button in the topbar
     */
    'hint_icon' => 'heroicon-o-question-mark-circle',

    /**
     * The class of the hint button can be changed here
     */
    'hint_class' => 'w-5 h-5 cursor-pointer text-gray-800 dark:text-white',

    /**
     * Creating or updating a hint button color can be changed here
     */
    'upsert_hint_button_color' => 'success',
    'delete_hint_button_color' => 'warning',

    /**
     * Use this option to control whether you want to show the page hint resource in the navigation.
     */
    'show_resource_in_navigation' => true,
    /**
     * Rich Text Editor used for hints toolbar buttons can be edited here.
     */
    'toolbar_buttons' => [
        'blockquote',
        'bold',
        'bulletList',
        'codeBlock',
        'h3',
        'italic',
        'link',
        'orderedList',
        'strike',
    ],
];


'table_name' => 'filament_page_hints'


// `views/vendor/filament-page-hints/components/modal/actions.blade.php`
// hide the create action
@can('create_hints')
    <div {{ $attributes }}>
        ... // other blade code here
    </div>
@endcan

// `views/vendor/filament-page-hints/page-hints.blade.php`
// also hide the create/edit modal
@can('create_hints')
    <x-filament::modal id="create-hint" width="xl">
        ... // other blade code here
    </x-filament::modal>
@endcan

bash
php artisan filament-page-hints:install
bash
php artisan vendor:publish --tag="filament-page-hints-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="filament-page-hints-config"
bash
php artisan vendor:publish --tag="filament-page-hints-views"
bash
php artisan vendor:publish --tag="filament-page-hints-translations"