Bruno Silva
Bruno Silva
FFilament
Created by Bruno Silva on 10/14/2024 in #❓┊help
Unable to hide childItems in custom NavigationItem
yes
4 replies
FFilament
Created by Bruno Silva on 10/14/2024 in #❓┊help
Unable to hide childItems in custom NavigationItem
is this a normal behavior?
4 replies
FFilament
Created by Bruno Silva on 9/26/2024 in #❓┊help
conditionally set dark mode
anyone?
6 replies
FFilament
Created by Bruno Silva on 9/26/2024 in #❓┊help
conditionally set dark mode
I've tried RenderHooks to add a JS script and inject the class "dark", but it gets cleared after the page loads
6 replies
FFilament
Created by Bruno Silva on 8/1/2024 in #❓┊help
Require Login/Register to Execute Action
don't know if this is the best solution, but I did: In the public page:
public function submit()
{
$data = $this->form->getState();

session(['first_booking_data' => $data]);

return redirect()->route('filament.client.auth.register');
}
public function submit()
{
$data = $this->form->getState();

session(['first_booking_data' => $data]);

return redirect()->route('filament.client.auth.register');
}
Then created a listener that listen to Filament\Events\Auth\Registered, to handle the processsing of that booking
9 replies
FFilament
Created by Bruno Silva on 8/1/2024 in #❓┊help
Require Login/Register to Execute Action
this form is for something else, to gather data to create a reservation and a vehicle for that user.
9 replies
FFilament
Created by Bruno Silva on 8/1/2024 in #❓┊help
Require Login/Register to Execute Action
but I'll check if I can do it with middlewares
9 replies
FFilament
Created by Bruno Silva on 8/1/2024 in #❓┊help
Require Login/Register to Execute Action
I'm not sure what to do, but I wanted the user to fill the form before the login, and then create everything that they filled after the login or register
9 replies
FFilament
Created by Bruno Silva on 7/30/2024 in #❓┊help
Checkboxlist selecting all options
found the problem... In my CreateBooking I have a fillForm :
protected function fillForm(): void
{
$data = request()->first_booking_data;

if ($data) {
$this->form->fill($data);
}
}
protected function fillForm(): void
{
$data = request()->first_booking_data;

if ($data) {
$this->form->fill($data);
}
}
I did that so the client can fill a form without logging in. Then it would send that data to this resource to automatically fill that form after the client registers. Adding this line at the end seems to have worked: $this->form->fill(); but I'm trying to improve this code. It doesn't feel like the right way to do it. anyway, thanks for the help!
7 replies
FFilament
Created by Bruno Silva on 7/30/2024 in #❓┊help
Checkboxlist selecting all options
odd, I've created a project from scratch just to create two panels and test that, but it worked normally... I'll continue investigating
7 replies
FFilament
Created by Bruno Silva on 7/30/2024 in #❓┊help
Checkboxlist selecting all options
No, standard resource, but in a different panel
class BookingResource extends Resource
{
protected static ?string $model = Booking::class;

protected static ?string $modelLabel = 'Reserva';

protected static ?string $navigationLabel = 'Minhas Reservas';

protected static ?string $navigationIcon = AppIcons::Calendar->value;

public static function form(Form $form): Form
{
return $form
->schema([
CheckboxList::make('technologies')
->options([
'tailwind' => 'Tailwind CSS',
'alpine' => 'Alpine.js',
'laravel' => 'Laravel',
'livewire' => 'Laravel Livewire',
]),
]);
}

public static function table(Table $table): Table
{
return BookingTable::table($table);
}

public static function getPages(): array
{
return [
'index' => Pages\ListBookings::route('/'),
'create' => Pages\CreateBooking::route('/create'),
'edit' => Pages\EditBooking::route('/{record}/edit'),
];
}
}
class BookingResource extends Resource
{
protected static ?string $model = Booking::class;

protected static ?string $modelLabel = 'Reserva';

protected static ?string $navigationLabel = 'Minhas Reservas';

protected static ?string $navigationIcon = AppIcons::Calendar->value;

public static function form(Form $form): Form
{
return $form
->schema([
CheckboxList::make('technologies')
->options([
'tailwind' => 'Tailwind CSS',
'alpine' => 'Alpine.js',
'laravel' => 'Laravel',
'livewire' => 'Laravel Livewire',
]),
]);
}

public static function table(Table $table): Table
{
return BookingTable::table($table);
}

public static function getPages(): array
{
return [
'index' => Pages\ListBookings::route('/'),
'create' => Pages\CreateBooking::route('/create'),
'edit' => Pages\EditBooking::route('/{record}/edit'),
];
}
}
7 replies
FFilament
Created by Bruno Silva on 7/15/2024 in #❓┊help
livewire()->fillForm() not working
worked... thanks very much, why did my other tests keep working but this one? all of them were using the exact same helpers
9 replies
FFilament
Created by Bruno Silva on 7/15/2024 in #❓┊help
livewire()->fillForm() not working
value = local
9 replies
FFilament
Created by Bruno Silva on 7/15/2024 in #❓┊help
livewire()->fillForm() not working
false
9 replies
FFilament
Created by Bruno Silva on 7/8/2024 in #❓┊help
App Dropdowns full width
thanks by the way! 🙏
5 replies
FFilament
Created by Bruno Silva on 7/8/2024 in #❓┊help
App Dropdowns full width
-- yes -- no I think it was cache because I did nothing and it started working again, I'll mark as solved
5 replies
FFilament
Created by Bruno Silva on 4/14/2024 in #❓┊help
Create related record inside infolist
thanks anyway Leandro 🙏
7 replies
FFilament
Created by Bruno Silva on 4/14/2024 in #❓┊help
Create related record inside infolist
ok, I've made an Action like this:
Action::make('createInvoice')
->form(InvoiceForm::getForm(true))
->action(function (Booking $record, Action $action, array $data) {
$record->invoice()->create($data);
$record->save();
})
->icon('heroicon-o-arrow-right-start-on-rectangle'),
Action::make('createInvoice')
->form(InvoiceForm::getForm(true))
->action(function (Booking $record, Action $action, array $data) {
$record->invoice()->create($data);
$record->save();
})
->icon('heroicon-o-arrow-right-start-on-rectangle'),
in that getForm method, I've added a param to prevent relationship errors by hiding some fields. The problem was that I didn't want to make different forms for the same thing, so now I have only one form that I can make a few changes if I pass that param
7 replies
FFilament
Created by Bruno Silva on 4/14/2024 in #❓┊help
Create related record inside infolist
No description
7 replies
FFilament
Created by Bruno Silva on 4/14/2024 in #❓┊help
Create related record inside infolist
anyone?
7 replies