PHP code example of qalainau / filament-inbox

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

    

qalainau / filament-inbox example snippets


use FilamentInbox\Concerns\HasInbox;

class User extends Authenticatable
{
    use HasInbox;
}

use FilamentInbox\FilamentInboxPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->databaseNotifications()
        ->plugin(FilamentInboxPlugin::make());
}

// config/filament-inbox.php
return [
    // Custom user model (defaults to auth provider model)
    'user_model' => null,

    // Custom users table name (auto-detected from model)
    'users_table' => null,

    // Tenant-users relationship method on tenant model
    // Auto-detects 'members' or 'users' if null
    'tenant_users_relationship' => null,
];
bash
php artisan make:notifications-table
php artisan migrate
bash
php artisan vendor:publish --tag=filament-inbox-config