PHP code example of savannabits / filament-modules

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

    

savannabits / filament-modules example snippets


// e.g. in App\Providers\Filament\AdminPanelProvider.php
 
use Coolsam\Modules\ModulesPlugin;
public function panel(Panel $panel): Panel
{
    return $panel
        ...
        ->plugin(ModulesPlugin::make());
}

use Coolsam\Modules\Resource;

use Coolsam\Modules\Page;

use Coolsam\Modules\TableWidget;

use Coolsam\Modules\ChartWidget;

use Coolsam\Modules\StatsOverviewWidget;

use CanAccessTrait;
bash
php artisan modules:install
bash
php artisan vendor:publish --tag="modules-config"
bash
php artisan module:make MyModule
bash
php artisan module:filament:install MyModule
bash
php artisan module:make:filament-resource
# Aliases
php artisan module:filament:resource
php artisan module:filament:make-resource
bash
php artisan module:make:filament-page
# or
php artisan module:filament:page
php artisan module:filament:make-page
bash
php artisan module:make:filament-widget
# or
php artisan module:filament:widget
php artisan module:filament:make-widget
bash
php artisan module:make:filament-cluster
# or
php artisan module:filament:cluster
php artisan module:filament:make-cluster
bash
php artisan module:make:filament-plugin
# or
php artisan module:filament:plugin
php artisan module:filament:make-plugin
bash
php artisan module:make:filament-theme
# or
php artisan module:filament:theme
php artisan module:filament:make-theme
bash
php artisan module:make:filament-panel
# or
php artisan module:filament:panel
php artisan module:filament:make-panel