rabol
How can I avoid pest tests failing if I install frontend panel with the id dashboard
Install a new Laravel app, with Jetstream as the starterkit and pest. Install Filament and create a new panel for the users dashboard.
First run php artisan test and make sure that all tests are passing
then
for the dashboard to work, you have to remove the 'jetstream' dashboard route from your web.php, then you have to modify a few view's
then run
and 2-3 test will fail
is there a recommend way to avoid this ?
7 replies
Filament::getPanel('dashboard')->getUrl() returns the wrong url
I have a laravel app, based on JetStream, I have two panels, Admin and Dashboard
in my I have this:
but.... the url is mysite.test/admin and not mysite.test/dashboard
if I then create a simple view like this:
the url is ok in the view but not in the menu
4 replies
Why does getModelLabel change my text ?
If I understand it correctly, then resource::getLabel() is deprecated, and one should use resource::getModelLabel().
But... why does filament change the text that I return to plural ?
become 'Block fields'
4 replies
TypeError on resource where column is an Enum
I have a User Model, and did like this:
php artisan make:filament-resource UserResource -G
and when I try to view the users i get this: I get it even if I remove the column that uses enum the enum: What am I missing ?
and when I try to view the users i get this: I get it even if I remove the column that uses enum the enum: What am I missing ?
26 replies
is there a 'before the create button is clicked hook'
It might not be a big issue, but I just discovered that in one have a upload comonemt in a form e.g. like this:
while this works it will give issues in some cases where the 'filesystems.default' is set to 'local' or if the the configuration does not have a 'url' key, in that case it would be nice to be able to do some validation even before allowing the user to create a new record.
I know that there is beforValidate() and beforCreate(), but in this case the user has already entered some information in the form
is there a way to do something just before the create button is pressed ?
2 replies
How can I always use the App login page and never the Filament login page
Hi
Is there a way to make sure that the 'normal' login page is always used instead of the Filament login page ?
I have tried to add in the AdminPanelProvider but when trying to access /admin it redirect to admin/login and show the Filament login page
4 replies
how do I get the active locale to be used in a translatable select
I have a translatable resource and this resource have a belongsTo relationship to another translatable resource
Both resources are created with the -S option
FaqCategory and Faq ar both translatable
When creating a new Faq, I have this:
It works, but I always get the 'English' name in the select
I can see that the trait on the has a getActiveTableLocale(), but as it's not a static methodI cannot call that in my resource, so how do I get the active locale
2 replies
does filament-spatie-translatable work when the resource is generated with -S option
For a FAQ 'module' I'm trying to use the https://filamentphp.com/plugins/filament-spatie-translatable plugin, I have added the plugin to the panel.
I then generated the resource
I have added the
to the resource
but the create and editdoes not have controls for the translations
6 replies
Problems pasing parameters to pages in a plugin
I'm having trouble to pass parameters to a page my log viewer plugin.
I'm using Sushi as my 'record' so I cannot have a normal Filament resource
I have 3 pages
the main page that list the log files - works, no problem
the log file page that lists the entries in the log file - some how it works
the log file entry page that shows details of a log entry - does not work at all
all 3 pages is registered in the plugin like this:
In LogViewerPage I have a table, and this is how I generate the actions
in LogViewerViewLogPage the mount() throws an error
Unable to resolve dependency [Parameter #0 [ <required> $fileName ]] in class Rabol\FilamentLogviewer\Pages\LogViewerViewLogPage
the url looks like this:
any hint on what I'm missing ?
15 replies
plugin upgrade
Hi
I'm trying to upgrade my filament-logviewer plugin
I have used the 'skeleton' plugin (did you check the skeleton
https://github.com/filamentphp/plugin-skeleton)
The plugin get's installed, but it does not show up in the admin panel automatically
I'm sure I missed something, but not really sure what
8 replies
Getting 404 when loading assets
Hi
My Filament admin panel has been working for some time, but just today I get a 404 when loading the assets
If i try to access the assets directly
https://xxxx/filament/assets/app.css?id=ceb9a486dfc44ebe8adaa3bd510821e8
I get the the css but when loading the panel the css is not loaded and in the console I can see 404 errors
Yes, I have found other discussions here and it does not solve my issue
60 replies
How do I get the file in a upload action
on a resource page I have an action:
shows a modal, one can upload a file and it call my 'import' method.
But... what parameters do I get in my method?
I would lige to get the current record and then the fileupload so that I can 'import' the data in this case
Does not work
10 replies