bflip
bflip
FFilament
Created by bflip on 9/10/2024 in #❓┊help
How do you style page components?
I have a simple page component. Say it's a white box: <div class="bg-white"></div> I have this component on a filamentPage. How do I compile the tailwind classes just for that component? If I add @vite(['resources/sass/app.scss']), it brings in bg-white, but the default theme breaks as that class exists for some reason in the sidebar. I would have imagined the default theme to not have classes sitting there that can be overridden so easy? What am I missing?
4 replies
FFilament
Created by bflip on 8/26/2024 in #❓┊help
single record edit
Going off this tutorial: https://laraveldaily.com/post/filament-edit-only-single-record-custom-page I have a working form on my FilamentPage. However the related select field doesn't populate. This all works great in the actual admin Resource. But not on the other side where a user logs in to edit one record.
5 replies
FFilament
Created by bflip on 4/2/2024 in #❓┊help
Bumped from 3 to 3.2 and getting Leage\Csv\Writer not found
/vendor/filament/actions/src/Exports/Jobs/PrepareCsvExport.php:53 Leage\Csv\Writer not found
/vendor/filament/actions/src/Exports/Jobs/PrepareCsvExport.php:53 Leage\Csv\Writer not found
Did I miss a step? For context, this is for an export action. I did try composer require filament/filament:^3.2 -W but doesn't seem to have helped. I've also tried simply requiring League/Csv but it didn't help. I do see the League\Csv\Writer file in my vendor folder. I'm not sure what's up...
4 replies
FFilament
Created by bflip on 3/31/2024 in #❓┊help
Method Filament\Actions\ExportAction::table does not exist.
Just upgraded to Filament 3.2 to get this Export working, but no dice so far. I migrated teh tables, and I can see the export table. I'm not sure why the error though. This is my code;
return $table
->headerActions([
ExportAction::make()
->exporter(UserExporter::class)
->formats([
ExportFormat::Csv,
]),
])
return $table
->headerActions([
ExportAction::make()
->exporter(UserExporter::class)
->formats([
ExportFormat::Csv,
]),
])
3 replies
FFilament
Created by bflip on 11/27/2023 in #❓┊help
getUrl() must be of type array
Trying to have my relational resource not open in a modal. Using this:
->actions([
Tables\Actions\EditAction::make()
->url(fn(Model $record): string => VideoResource::getUrl('edit', $record)),
])
->actions([
Tables\Actions\EditAction::make()
->url(fn(Model $record): string => VideoResource::getUrl('edit', $record)),
])
I'm getting error:
Filament\Resources\Resource::getUrl(): Argument #2 ($parameters) must be of type array
Filament\Resources\Resource::getUrl(): Argument #2 ($parameters) must be of type array
Based on this: https://v2.filamentphp.com/tricks/relation-manager-edit-record-without-modal Any ideas?
4 replies
FFilament
Created by bflip on 10/12/2023 in #❓┊help
Vite not refreshing dashboard views
Refreshes and compiles on the welcome.blade.php. Doesn't refresh on inner filament pages. Won't compile tailwind classes on livewire components either. I am stumped!
import {defineConfig} from 'vite'
import laravel, {refreshPaths} from 'laravel-vite-plugin'

export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: [
...refreshPaths,
'app/Filament/**',
'app/Forms/Components/**',
'app/Livewire/**',
'app/Infolists/Components/**',
'app/Providers/Filament/**',
'app/Tables/Columns/**',
'resources/views/**',
'resources/views/livewire**',
],
}),
],
})
import {defineConfig} from 'vite'
import laravel, {refreshPaths} from 'laravel-vite-plugin'

export default defineConfig({
plugins: [
laravel({
input: ['resources/css/app.css', 'resources/js/app.js'],
refresh: [
...refreshPaths,
'app/Filament/**',
'app/Forms/Components/**',
'app/Livewire/**',
'app/Infolists/Components/**',
'app/Providers/Filament/**',
'app/Tables/Columns/**',
'resources/views/**',
'resources/views/livewire**',
],
}),
],
})
7 replies
FFilament
Created by bflip on 10/10/2023 in #❓┊help
How to setup Laravel Spark?
https://filamentphp.com/docs/3.x/panels/tenancy#billing Looks like Spark integrates nicely if it's a multi tenant system. Mine is multi tenant, but only in the way that models have a global auth()->user_id scope. I enable tenantBillingProvider, but see nowhere to manage billing in the front views?
3 replies
FFilament
Created by bflip on 10/10/2023 in #❓┊help
Add global scope within Filament
I found this in docs:
public static function getEloquentQuery(): Builder
{
return parent::getEloquentQuery()->where('is_active', true);
}

https://filamentphp.com/docs/3.x/panels/resources/getting-started#customizing-the-resource-eloquent-query
public static function getEloquentQuery(): Builder
{
return parent::getEloquentQuery()->where('is_active', true);
}

https://filamentphp.com/docs/3.x/panels/resources/getting-started#customizing-the-resource-eloquent-query
But where am I adding that? I get errors adding to a resource.
5 replies
FFilament
Created by bflip on 10/10/2023 in #❓┊help
Select Default not working
Not sure what I'm drinking this morning, but coding is hard. haha No idea why this select isn't setting my default? Just says "Select an option"
Select::make('expires')
->options([
'never' => 'Never',
'date' => 'Date',
])
->default('never')
->required(),
Select::make('expires')
->options([
'never' => 'Never',
'date' => 'Date',
])
->default('never')
->required(),
4 replies
FFilament
Created by bflip on 10/10/2023 in #❓┊help
Brand Logo not updating
No description
15 replies
FFilament
Created by bflip on 10/3/2023 in #❓┊help
Sort table by default DESC instead of ASC
My resource table sorts DESC by default. How do I change that to reverse it?
5 replies
FFilament
Created by bflip on 10/3/2023 in #❓┊help
Return a Resource Route
I have a resource with Routes defined (like index). I have a custom livewire page. How can I redirect to the index of that resource? Trying: return redirect()->route('resourcename.index')
4 replies
FFilament
Created by bflip on 10/3/2023 in #❓┊help
Get Preview Image from Upload
I'm trying to get the preview image from the file upload field. Any suggestions? I have a Filament Page, with a Livewire component loading a Form.
3 replies
FFilament
Created by bflip on 9/28/2023 in #❓┊help
Display "preview" from Form field?
Very new to Filament. I am needing to show a "preview" of the fields. For example, two columns. 1. Displays name and color input fields 2. Displays a preview of the name in said color This is just for example sakes. I understand this all uses Livewire, so what I'm thinking is I create a new form field that basically acts as my preview window... but how specifically would I pass the name/color fields to my preview field? Thanks so much!
27 replies