Skip to content

Getting started

Installation

install filament package

composer require filament/filament:"^3.1"

you need to install package spatie permission and spatie media library to use this package

composer require spatie/laravel-permission:"^6.3"
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"

composer require spatie/laravel-medialibrary:"^10.0"
php artisan vendor:publish --provider="Spatie\MediaLibrary\MediaLibraryServiceProvider"

then install filament-suitcms plugin package via composer:

composer require jhonoryza/filament-suitcms

install filament-suitcms plugin

php artisan filament-suitcms:install

this command will do :

  1. publish filament-suitcms config to folder config/cms
  2. ask to run migration, if you get asked Would you like to run the migrations now? choose yes, this will run migration for media and roles permission
  3. add default suitcms model
  4. sync permission data
  5. generate some policies
  6. generate default super admin user, default admin user is [email protected] with password : password
  7. generate default setting data

adjust config/auth.php add this

    'guards' => [
        'cms' => [
            'driver' => 'session',
            'provider' => 'cms',
        ],
    ],

    'providers' => [
        'cms' => [
            'driver' => 'eloquent',
            'model' => App\Models\Admin::class,
        ],
    ],

    'passwords' => [
        'cms' => [
            'provider' => 'cms',
            'table' => 'admin_password_reset_tokens',
            'expire' => 60,
            'throttle' => 60,
        ],
    ],

now you can create filament panel builder using this command :

php artisan filament:install --panels

then open PanelProvider add this line

    public function panel(Panel $panel): Panel
    {
        return $panel
            ->plugin(SuitcmsToolkit::make()); // add this line
    }