PHP code example of webbingbrasil / filament-jetstream-theme

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

    

webbingbrasil / filament-jetstream-theme example snippets



use Webbingbrasil\FilamentJetstreamTheme\Rules\Password;

Forms\Components\TextInput::make('new_password')
    ->label(__('filament-jetstream::default.fields.new_password'))
    ->password()
    ->rules(Password::make()
            ->

## in Service Provider file
public function boot()
{
    Filament::registerRenderHook(
        'filament-jetstream.profile-page.start',
        fn (): string => Blade::render('@livewire(\'profile-instructions\')'),
    );
    Filament::registerRenderHook(
        'filament-jetstream.profile-page.after-profile-form',
        fn (): string => Blade::render('@livewire(\'extra-forms\')'),
    );
    Filament::registerRenderHook(
        'filament-jetstream.profile-page.end',
        fn (): string => Blade::render('@livewire(\'filament-two-factor-form\')'),
    );
}

namespace App\Filament\Pages;

use Webbingbrasil\FilamentJetstreamTheme\Pages\Profile as BaseProfile;
use Filament\Forms;

class Profile extends BaseProfile
{

  protected function getProfileFormSchema(): array
    {
        return array_merge(parent::getProfileFormSchema(), [
            Forms\Components\TextInput::make("job_title"),
            Forms\Components\Checkbox::make("marketing_consent")->label(
                "I consent to receive email notifications....."
            ),
        ]);
    }

use Filament\Facades\Filament;
use Filament\Navigation\UserMenuItem;
 
Filament::serving(function () {
    Filament::registerUserMenuItems([
        UserMenuItem::make()
            ->label('Settings')
            ->url(route('filament.pages.settings'))
            ->icon('heroicon-s-cog'),
        // ...
    ]);
});
bash
php artisan vendor:publish --tag="filament-jetstream-config"
bash
php artisan vendor:publish --tag="filament-jetstream-views"