Quin.
Quin.
FFilament
Created by Quin. on 5/1/2024 in #❓┊help
Get the profile icon to the sidebar
No description
7 replies
FFilament
Created by Quin. on 4/30/2024 in #❓┊help
Create a confetti effect when press create button
Hello! I wanted to create a confetti effect every time someone press the create button in side a filament resource create page, ps://confettijs.org/ with this one, it JS. Is it possible?
2 replies
FFilament
Created by Quin. on 1/10/2024 in #❓┊help
SelectColumn with carbon
Hello! If i click on the previous or next month it shows that it goes 2 months back or forward but it saves as 1 month back or forward. can anyone tell me how i fix that it will only shows 1 month forward of backwards
SelectColumn::make('invoice_month')
->options(function (Invoice $record) {[
$previousMonth = Carbon::parse($record->invoice_month)->subMonth()->format('Y-m'),
$currentMonth = Carbon::parse($record->invoice_month)->format('Y-m'),
$nextMonth = Carbon::parse($record->invoice_month)->addMonth()->format('Y-m')
];
return [
$previousMonth => $previousMonth,
$currentMonth => $currentMonth,
$nextMonth => $nextMonth,
];
}),
SelectColumn::make('invoice_month')
->options(function (Invoice $record) {[
$previousMonth = Carbon::parse($record->invoice_month)->subMonth()->format('Y-m'),
$currentMonth = Carbon::parse($record->invoice_month)->format('Y-m'),
$nextMonth = Carbon::parse($record->invoice_month)->addMonth()->format('Y-m')
];
return [
$previousMonth => $previousMonth,
$currentMonth => $currentMonth,
$nextMonth => $nextMonth,
];
}),
3 replies
FFilament
Created by Quin. on 1/5/2024 in #❓┊help
is there an easy way to translate the create button
No description
6 replies
FFilament
Created by Quin. on 1/2/2024 in #❓┊help
Show columns based on filters
Hello i had a question about the filters. I made a trashed filter but i only want to show the deleted_at column if the filter Only deleted records is selected is there anyway that is possible?
11 replies
FFilament
Created by Quin. on 12/19/2023 in #❓┊help
Change the color of the widget
No description
3 replies
FFilament
Created by Quin. on 12/13/2023 in #❓┊help
Change the create button label
No description
6 replies
FFilament
Created by Quin. on 12/7/2023 in #❓┊help
put 2 values in to one Textinput
Ello, i have the terms and categories. but i wanted to make a option avaible so you can set the full domain in once
public static function form(Form $form): Form
{
return $form->schema([
Select::make('categories')
->multiple()
->options(fn (): array => Category::orderBy('id', 'asc')->pluck('name', 'id')->toArray())
->getSearchResultsUsing(fn (string $search): array => Category::where('name', 'like', "%{$search}%")->limit(50)->pluck('name', 'id')->toArray()),
TagsInput::make('terms'),
TextInput::make('fulldomain'),
]);
}
public static function form(Form $form): Form
{
return $form->schema([
Select::make('categories')
->multiple()
->options(fn (): array => Category::orderBy('id', 'asc')->pluck('name', 'id')->toArray())
->getSearchResultsUsing(fn (string $search): array => Category::where('name', 'like', "%{$search}%")->limit(50)->pluck('name', 'id')->toArray()),
TagsInput::make('terms'),
TextInput::make('fulldomain'),
]);
}
So like terms '.' categories for example filament.com so it has the term and categorie but in one textinput
7 replies
FFilament
Created by Quin. on 12/5/2023 in #❓┊help
FileUpload directly in to the field
No description
9 replies
FFilament
Created by Quin. on 12/5/2023 in #❓┊help
Money function but what if it is empty?
No description
16 replies
FFilament
Created by Quin. on 12/4/2023 in #❓┊help
Adding action to a form next to the delete button
No description
5 replies
FFilament
Created by Quin. on 11/30/2023 in #❓┊help
Custom page adding Section
Hello! i am just diving into the custom page section! this is mine section
public function transaction()
{
Section::make('transaction')
->icon('heroicon-o-document-text')
->description('Alle invoices')
->schema([
TextColumn::make('description')
->label('Beschrijving'),
TextColumn::make('price')
->label('Prijs'),
]);
}
public function transaction()
{
Section::make('transaction')
->icon('heroicon-o-document-text')
->description('Alle invoices')
->schema([
TextColumn::make('description')
->label('Beschrijving'),
TextColumn::make('price')
->label('Prijs'),
]);
}
but i don't know how to show this in the custom page and define the model so it can get its content , Anyone can help? I want 3 different sections with 3 different models
2 replies
FFilament
Created by Quin. on 11/27/2023 in #❓┊help
file upload question
i really don't know how to describe this... I am new with the hole file upload. but here is my question! I am making a File upload when you upload your file , the file needs to get in a function like my code (Code below) It needs to get the file_get_contents, how can i do that?
public static function table(Table $table): Table
{
return $table->columns([
TextColumn::make('description'),
TextColumn::make('price'),
TextColumn::make('timestamp'),
])->headerActions([
Action::make('import')
->form([
FileUpload::make('file')
->reactive()
->visibility('private')
])
->label('Upload Transaction file')
->icon('heroicon-o-folder-open')
->handler([static::class, 'handleImport']),
]);
}

public static function handleImport(array $data): void
{
$file = $data['file'];
$file_get_contents($file)
public static function table(Table $table): Table
{
return $table->columns([
TextColumn::make('description'),
TextColumn::make('price'),
TextColumn::make('timestamp'),
])->headerActions([
Action::make('import')
->form([
FileUpload::make('file')
->reactive()
->visibility('private')
])
->label('Upload Transaction file')
->icon('heroicon-o-folder-open')
->handler([static::class, 'handleImport']),
]);
}

public static function handleImport(array $data): void
{
$file = $data['file'];
$file_get_contents($file)
9 replies
FFilament
Created by Quin. on 11/24/2023 in #❓┊help
Custom page that's create a record
Hello i am trying to make a custom page that has a form that can create a record for my model. Unfornatly it is not working right now. I can't find the best example on the internet someone can help?
class RequestDomainPage extends Page implements HasForms
{

use InteractsWithForms;

protected static ?string $model = RequestDomain::class;
protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.pages.request-domain-page';

protected static ?string $title = 'Domein aanvragen';


public $domain;
public $customer_id;


public function mount(): void
{
$this->form->fill();
}

protected function getFormSchema(): array
{
return [
Card::make()->schema([
TextInput::make('domain')
->label('Domain')
->required(),
Select::make('customer_id')
->label('Customer')
->placeholder('Select Customer')
->options(
\App\Models\Customer::all()->pluck('name', 'id')
)
->required(),
])
];
}
protected function getFormActions(): array
{
return [
Action::make('kak')
->label('Submit')
->action(function (RequestDomain $requestDomain) {
RequestDomain::create([
'domain' => $this->domain,
'customer_id' => $this->customer_id
]);
}),
];
}
}
class RequestDomainPage extends Page implements HasForms
{

use InteractsWithForms;

protected static ?string $model = RequestDomain::class;
protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.pages.request-domain-page';

protected static ?string $title = 'Domein aanvragen';


public $domain;
public $customer_id;


public function mount(): void
{
$this->form->fill();
}

protected function getFormSchema(): array
{
return [
Card::make()->schema([
TextInput::make('domain')
->label('Domain')
->required(),
Select::make('customer_id')
->label('Customer')
->placeholder('Select Customer')
->options(
\App\Models\Customer::all()->pluck('name', 'id')
)
->required(),
])
];
}
protected function getFormActions(): array
{
return [
Action::make('kak')
->label('Submit')
->action(function (RequestDomain $requestDomain) {
RequestDomain::create([
'domain' => $this->domain,
'customer_id' => $this->customer_id
]);
}),
];
}
}
19 replies
FFilament
Created by Quin. on 11/24/2023 in #❓┊help
based on roles only view index and create
Hello! i only want to display the create for the user role . The admin will have acces to index,edit and create Does anyone know how to do this?
9 replies
FFilament
Created by Quin. on 11/23/2023 in #❓┊help
Disable the dashboard on Role user
Hello i have searched the web for a answer but couldn't find a direct answer for the problem many people have a other idea. i just want to disable the dashboard when your a user just going to another filament resource. any know how?
3 replies
FFilament
Created by Quin. on 11/23/2023 in #❓┊help
Grouping 2 columns is it possible?
Hello! is it possible for 2 columns to be grouped together?
Tables\Columns\TextColumn::make('domain')
->searchable(),
Tables\Columns\IconColumn::make('domainextension.description')->label('Description')->translateLabel()
->tooltip(function ($record) { return $record->domainextension->description; })
->alignCenter()
->icon('heroicon-o-information-circle'),
Tables\Columns\TextColumn::make('domain')
->searchable(),
Tables\Columns\IconColumn::make('domainextension.description')->label('Description')->translateLabel()
->tooltip(function ($record) { return $record->domainextension->description; })
->alignCenter()
->icon('heroicon-o-information-circle'),
5 replies
FFilament
Created by Quin. on 11/23/2023 in #❓┊help
Hidden Column on $record
I want to hide a column when $record->description is empty anyone has a idea how to? because i couldn't assignee $record to the hidden function Just like in the tooltip
Tables\Columns\IconColumn::make('domainextension.description')->label('Description')->translateLabel()
->tooltip(function ($record) { return DomainExtension::find($record->domain_extensions_id)->description; })
->alignCenter()
->hidden(function ($record) { dd($record); })
->icon('heroicon-o-information-circle')
Tables\Columns\IconColumn::make('domainextension.description')->label('Description')->translateLabel()
->tooltip(function ($record) { return DomainExtension::find($record->domain_extensions_id)->description; })
->alignCenter()
->hidden(function ($record) { dd($record); })
->icon('heroicon-o-information-circle')
6 replies
FFilament
Created by Quin. on 11/21/2023 in #❓┊help
Upgraded to v3 icon-button error
No description
6 replies
FFilament
Created by Quin. on 11/21/2023 in #❓┊help
upgrading from v2 to v3 but requires composer not higher than v2
No description
4 replies