PHP code example of filament / spatie-laravel-settings-plugin

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

    

filament / spatie-laravel-settings-plugin example snippets


protected static string $settings = FooterSettings::class;

use Filament\Forms\Components\Repeater;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Schema;

public function form(Schema $schema): Schema
{
    return $schema
        ->components([
            TextInput::make('copyright')
                ->label('Copyright notice')
                ->

public static function canAccess(): bool
{
    return auth()->user()->isAdmin();
}

public static function canEdit(): bool
{
    return auth()->user()->isAdmin();
}
bash
php artisan make:filament-settings-page ManageFooter FooterSettings
bash
php artisan vendor:publish --tag=filament-spatie-laravel-settings-plugin-translations