Fellipe
Fellipe
FFilament
Created by Fellipe on 9/23/2024 in #❓┊help
How to get actually theme on filament
Hello, I would like to get the current color of the filament, is there any way within DashboardAdmin.php?
3 replies
FFilament
Created by Fellipe on 7/29/2024 in #❓┊help
filament desconfigured view
No description
3 replies
FFilament
Created by Fellipe on 7/9/2024 in #❓┊help
Form with Table error Method Not Allowed
hi Hi, I'm having problems with my filament when I use table and form at the same time, can anyone help? dont call fn create on click button submit... I installed tailwind and it seems to have disconfigured my entire app...
@vite('resources/css/app.css')
<x-filament-panels::page>
<form wire:submit.prevent="create">
{{ $this->form }}
<button class="w-full bg-amber-500 p-2 rounded-lg text-slate-900 font-bold mt-3" type="submit" form="submit">Pagar</button>
</form>
{{ $this->table }}
</x-filament-panels::page>
@vite('resources/css/app.css')
<x-filament-panels::page>
<form wire:submit.prevent="create">
{{ $this->form }}
<button class="w-full bg-amber-500 p-2 rounded-lg text-slate-900 font-bold mt-3" type="submit" form="submit">Pagar</button>
</form>
{{ $this->table }}
</x-filament-panels::page>
8 replies
FFilament
Created by Fellipe on 3/31/2024 in #❓┊help
How change text Modal and table nothing register
No description
9 replies
FFilament
Created by Fellipe on 3/27/2024 in #❓┊help
Filament Page with Table
Hello, I have a model that has a HasMany(ModaliyYear) relationship and this model(ModaliyYear) has a HasMany(ModalityAttachment) relationship and I created a custom page to list/create the attachments, but I'm not getting it Error
Filament\Tables\Table::make(): Argument #1 ($livewire) must be of type Filament\Tables\Contracts\HasTable, App\Filament\Resources\ModalityResource\Pages\ModalityAttachments given, called in /var/www/vendor/filament/tables/src/Concerns/InteractsWithTable.php on line 241
Filament\Tables\Table::make(): Argument #1 ($livewire) must be of type Filament\Tables\Contracts\HasTable, App\Filament\Resources\ModalityResource\Pages\ModalityAttachments given, called in /var/www/vendor/filament/tables/src/Concerns/InteractsWithTable.php on line 241
Code
<?php

namespace App\Filament\Resources\ModalityResource\Pages;

use App\Filament\Resources\ModalityResource;
use Filament\Resources\Pages\Concerns\InteractsWithRecord;
use Filament\Forms\Components\Builder;
use Filament\Forms\Components\View;
use Filament\Resources\Pages\Page;
use Filament\Tables\Actions\Contracts\HasTable;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Concerns\InteractsWithTable;
use Filament\Tables\Table;

class ModalityAttachments extends Page implements HasTable
{
use InteractsWithRecord, InteractsWithTable;

protected static string $resource = ModalityResource::class;

protected static string $view = 'filament.resources.modality-resource.pages.modality-attachments';

public function table(Table $table) : static
{
return $table
->columns([
TextColumn::make('year')
]);
}

public function mount(int | string $modality, int | string $record): void
{
$this->record = $this->resolveRecord($record);
}

}
<?php

namespace App\Filament\Resources\ModalityResource\Pages;

use App\Filament\Resources\ModalityResource;
use Filament\Resources\Pages\Concerns\InteractsWithRecord;
use Filament\Forms\Components\Builder;
use Filament\Forms\Components\View;
use Filament\Resources\Pages\Page;
use Filament\Tables\Actions\Contracts\HasTable;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Concerns\InteractsWithTable;
use Filament\Tables\Table;

class ModalityAttachments extends Page implements HasTable
{
use InteractsWithRecord, InteractsWithTable;

protected static string $resource = ModalityResource::class;

protected static string $view = 'filament.resources.modality-resource.pages.modality-attachments';

public function table(Table $table) : static
{
return $table
->columns([
TextColumn::make('year')
]);
}

public function mount(int | string $modality, int | string $record): void
{
$this->record = $this->resolveRecord($record);
}

}
4 replies
FFilament
Created by Fellipe on 3/22/2024 in #❓┊help
Page without table, only form
Hi, I would like to know how to create a page without a table, just with a form
10 replies
FFilament
Created by Fellipe on 3/20/2024 in #❓┊help
Disable Input (or anything else) based on a select option
Hello, I'm new to filament, and I would like to know if it is possible for me to generate a section based on a user option, and I can change the form based on that option, is it possible? example:
Select::make('test')->options([
1 => 'First',
2 => 'Second'
])->afterUpdateState(function($state){
switch($state) {
case 1:
Section::make('...')
break;

case 2:
Section::make('...')
break;
}
})
Select::make('test')->options([
1 => 'First',
2 => 'Second'
])->afterUpdateState(function($state){
switch($state) {
case 1:
Section::make('...')
break;

case 2:
Section::make('...')
break;
}
})
2 replies