RoxanaAnghel
RoxanaAnghel
FFilament
Created by RoxanaAnghel on 12/15/2023 in #❓┊help
Auto save posts after a new field is added in JSON
I have a builder for my posts, and if I add a new field in my block, the field is not in the database until I save again the post. How can I autosave all my existing posts after adding a field, because I don't want to save manually each post. Thank You!
2 replies
FFilament
Created by RoxanaAnghel on 12/6/2023 in #❓┊help
Media library conversions
Hi everyone! Is there a way to disable the conversions from media library? I don't need them and i don't want to create them. Thanks!
3 replies
FFilament
Created by RoxanaAnghel on 10/13/2023 in #❓┊help
Filament V3 with webpack
Is Filament v3 still compatible with Webpack? I'm trying to update the project and create a new custom theme for Media Library Pro and I receive an error: Typed property Filament\Support\Assets\Asset::$package must not be accessed before initialization This is what i have in webpack.mix.js:
.postCss('resources/css/filament/admin/theme.css', 'assets/css', [
require('tailwindcss')
])
.postCss('resources/css/filament/admin/theme.css', 'assets/css', [
require('tailwindcss')
])
and this is what i have in AdminServiceProvider.php:
return $panel
->theme('resources/css/filament/admin/theme.css')
->default()
->id('admin')
->path('admin')
->login()
->authGuard(env('FILAMENT_AUTH_GUARD', 'admin'))
->colors([
'primary' => Color::Amber,
])
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([
Pages\Dashboard::class,
])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
])
->middleware([
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
AuthenticateSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
SubstituteBindings::class,
DisableBladeIconComponents::class,
DispatchServingFilamentEvent::class,
])
->authMiddleware([
Authenticate::class,
]);
return $panel
->theme('resources/css/filament/admin/theme.css')
->default()
->id('admin')
->path('admin')
->login()
->authGuard(env('FILAMENT_AUTH_GUARD', 'admin'))
->colors([
'primary' => Color::Amber,
])
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([
Pages\Dashboard::class,
])
->discoverWidgets(in: app_path('Filament/Widgets'), for: 'App\\Filament\\Widgets')
->widgets([
Widgets\AccountWidget::class,
Widgets\FilamentInfoWidget::class,
])
->middleware([
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
AuthenticateSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
SubstituteBindings::class,
DisableBladeIconComponents::class,
DispatchServingFilamentEvent::class,
])
->authMiddleware([
Authenticate::class,
]);
7 replies
FFilament
Created by RoxanaAnghel on 8/4/2023 in #❓┊help
Tabs bug?
Hi guys! I'm using filament to generate blog posts, and recently I've added tabs to my posts to keep my admin clean. My issue is next: - I have a tab named content where I have a builder block to add different content - When I try to add a new block, the page is scrolling in the middle of the page. I will put here a video to see the problem.
Tab::make('Content')
->schema([
Builder::make('contents')->label(__('Article'))
->blocks([
Builder\Block::make('content_block_title')->label(__('Title'))->icon('heroicon-o-bookmark')
->schema([
RichEditor::make('content_title')
->label('Content Title')
->toolbarButtons([
'bold',
'h2',
'italic',
'link',
'redo',
'strike',
'undo',
]),
]),
Builder\Block::make('content_block_form')->label(__('PDF download'))
->icon('heroicon-o-bookmark')
->schema([
RichEditor::make('content_form_heading')
->label('Form Heading (make it heading to be displayed as <h3>)')
->toolbarButtons([
'bold',
'h2',
'italic',
'link',
'redo',
'strike',
'undo',
]),
RichEditor::make('content_form_description')
->label('Form Description')
->toolbarButtons([
'bold',
'h2',
'italic',
'link',
'redo',
'strike',
'undo',
]),
Select::make('badge_id')->label('Badge')
->relationship('badge', 'name')
->searchable()
->optionsLimit(700)
->preload(),
TextInput::make('content_form_title')
->label('Form Title (use <br> for newline)'),
TextInput::make('content_form_download_url')->label('Form Download URL')->required(),
]),
Tab::make('Content')
->schema([
Builder::make('contents')->label(__('Article'))
->blocks([
Builder\Block::make('content_block_title')->label(__('Title'))->icon('heroicon-o-bookmark')
->schema([
RichEditor::make('content_title')
->label('Content Title')
->toolbarButtons([
'bold',
'h2',
'italic',
'link',
'redo',
'strike',
'undo',
]),
]),
Builder\Block::make('content_block_form')->label(__('PDF download'))
->icon('heroicon-o-bookmark')
->schema([
RichEditor::make('content_form_heading')
->label('Form Heading (make it heading to be displayed as <h3>)')
->toolbarButtons([
'bold',
'h2',
'italic',
'link',
'redo',
'strike',
'undo',
]),
RichEditor::make('content_form_description')
->label('Form Description')
->toolbarButtons([
'bold',
'h2',
'italic',
'link',
'redo',
'strike',
'undo',
]),
Select::make('badge_id')->label('Badge')
->relationship('badge', 'name')
->searchable()
->optionsLimit(700)
->preload(),
TextInput::make('content_form_title')
->label('Form Title (use <br> for newline)'),
TextInput::make('content_form_download_url')->label('Form Download URL')->required(),
]),
in this code the end tags are missing because is just a piece of code. Please let me know if there is anything I can do. Thanks!
7 replies