sdousley
sdousley
FFilament
Created by sdousley on 4/22/2024 in #❓┊help
Plugin [filament-laravel-log] is not registered for panel [app].
So, I've installed a plugin for viewing laravel logs (https://filamentphp.com/plugins/saade-laravel-log) and after installing it, and adding the plugin to the ->plugins() method of my AdminPanelProvider, loading my admin panel, I get the error that the plugin is not registered for the panel app. If I add it to the ->plugins() method of my AppPanelProvider, I'm able to load the view in my App panel (I don't want to be able to do this) howevre, in the Admin panel, the error changes to Route [filament.admin.pages.logs] not defined. Does anyone know how I can get this plugin to only show in my Admin panel? I've had a look through the GitHub, and doesn't appear that anyone else has had this issue, and it feels more like something to do with Filament loading the plugin, rather than the plugin itself.
3 replies
FFilament
Created by sdousley on 4/10/2024 in #❓┊help
createOptionForm not adhering to model policies
So, I've just created a new model, and policy for the model. Added the table/column through migrations. Now, when I add the means to add this to the main Resource, I get the option to add a related record, but even though I have permisisons set in the DB, and the model policy in place (no permissions from the policy granted) I am able to add new related models. Is this intended? I'm thinking it shouldn't be? Code to create the Option Form:
Select::make('industry_id')
->relationship('industry', 'name')
->searchable()
->preload()
->createOptionForm([
TextInput::make('name')
->required(),
]),
Select::make('industry_id')
->relationship('industry', 'name')
->searchable()
->preload()
->createOptionForm([
TextInput::make('name')
->required(),
]),
With this, I am able to create Industries regardless of whether the user I'm logged in as has any of the permissions.
3 replies
FFilament
Created by sdousley on 4/9/2024 in #❓┊help
Table Column - end of string
Hi I have a table, in which will be a sharepoint link, now that link - as you can imagine - will get quite long, so we would like a way to only show the last part of that url, or some different text. We have the copyable() method on the column, which is currently copying the sharepoint link fine. Is this something we can do, or could we make it so that just the word "link" shows rather than the actual column value?
5 replies
FFilament
Created by sdousley on 4/2/2024 in #❓┊help
Missing required parameter for View route
I have just found out the wonder of Repeaters, and after adding one to a form, the first time I submitted the form I got an error Missing required parameter for [Route: filament.admin.resources.customers.view] [URI: admin/customers/{record}] [Missing parameter: record] I haven't changed anything in terms of routing (that I know of!). In my CustomerResource::getPages() method, I have
'view' => Pages\ViewCustomer::route('/{record}'),
'view' => Pages\ViewCustomer::route('/{record}'),
which is what I had before this broke. I tried to remove the Repeater section, and I still get this error. What is strange though, is that when I complete the form - both with and without the repeater, the customer is created. But if I fill out the repeater, the Repeater element is NOT created.
8 replies
FFilament
Created by sdousley on 4/2/2024 in #❓┊help
Using Tailwind
Hi I have a project where I'm using Tailwind. I have a related resouce, which I want to highlught red when the end date is within a defined period, now, that bit works, and it adds a new class (basic tailwind class - bg-red-300) to the tr element within the table, however, whenever I run npm run dev, the base template Filament uses does NOT use the built version of CSS. Likewise if I run npm build it does not use the CSS from public/build/assets. I followed th Tailwind installation guide here https://filamentphp.com/docs/3.x/tables/installation#installing-tailwind-css but that doesn't appear to have helped. Interestingly, anything I add into the app.blade.php file that is suggested to be created in there is also not replicated, which is where I suspect this is not working as intended.
5 replies
FFilament
Created by sdousley on 3/30/2024 in #❓┊help
Livewire Component within tabs in Resource View
Hi I have an Infolist Builder, and within it, I ahve created some tabs. Now, I've worked out how to get a Livewire Component to render some content to one of the tabs, but what I would like is for that Livewire Component to display related objects.
I am also able to do that, but rather than showing objects related to the Resource I'm viewing, it shows ALL (in my component I have $table->query(Related::query()) so that doesn't really surprise me that it does that. What I would like to know is how I can get the parent Resource model/ID in the Component to be able to alter the query method to only return related models
10 replies