PHP code example of joaopaulolndev / filament-general-settings

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

    

joaopaulolndev / filament-general-settings example snippets


return [
    'show_application_tab' => true,
    'show_analytics_tab' => true,
    'show_seo_tab' => true,
    'show_email_tab' => true,
    'show_social_networks_tab' => true,
    'expiration_cache_config_time' => 60,
];

use Joaopaulolndev\FilamentGeneralSettings\Enums\TypeFieldEnum;

return [
    'show_application_tab' => true,
    'show_analytics_tab' => true,
    'show_seo_tab' => true,
    'show_email_tab' => true,
    'show_social_networks_tab' => true,
    'expiration_cache_config_time' => 60,
    'show_custom_tabs'=> true,
    'custom_tabs' => [
        'more_configs' => [
            'label' => 'More Configs',
            'icon' => 'heroicon-o-plus-circle',
            'columns' => 1,
            'fields' => [
                'custom_field_1' => [
                    'type' => TypeFieldEnum::Text->value,
                    'label' => 'Custom Textfield 1',
                    'placeholder' => 'Custom Field 1',
                    'xtarea',
                    'rows' => '3',
                    '


use Joaopaulolndev\FilamentGeneralSettings\FilamentGeneralSettingsPlugin;

...

->plugins([
    FilamentGeneralSettingsPlugin::make()
])

->plugins([
    FilamentGeneralSettingsPlugin::make()
        ->canAccess(fn() => auth()->user()->id === 1)
        ->setSort(3)
        ->setIcon('heroicon-o-cog')
        ->setNavigationGroup('Settings')
        ->setTitle('General Settings')
        ->setNavigationLabel('General Settings'),
    ])
bash
php artisan vendor:publish --tag="filament-general-settings-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="filament-general-settings-config"
bash
php artisan vendor:publish --tag="filament-general-settings-views"
bash
php artisan vendor:publish --tag="filament-general-settings-translations"
bash
php artisan vendor:publish --tag="filament-general-settings-assets"
bash
php artisan vendor:publish --tag="filament-general-settings-migrations"
php artisan migrate
bash
php artisan vendor:publish --tag="filament-general-settings-config"
bash
return [
    // Other configuration settings...
    'show_logo_and_favicon' => true,
];