Ava
Moving everything in /app to /something_else
Hey @Sodalis - To handle the potential issues with packages referencing
resourcePath()
, you could override Laravel’s default behavior. In your AppServiceProvider, like this:
This way, any calls to resourcePath()
will point to your custom location instead of the default. What do you think?23 replies
Moving everything in /app to /something_else
Hey @Sophist-UK - Laravel doesn’t provide a direct
$app->useXXXPath()
method for resources
, but you might be able to work around it by defining custom view paths in Service Providers. Here’s one way to handle it:
1. Set Custom View Paths in Service Providers For each module, you can add something like this in the register()
method of its ServiceProvider:
This would make views in myproject/module1/resources/views
accessible with the namespace module1::
.
2. CSS/JS with Vite and Tailwind For assets, you can configure Vite or Tailwind to point to module-specific directories. For example, in your vite.config.js
:
You might need to add a Fallback as well but this could allow modular resources folders without straying too far from Laravel’s conventions for views.23 replies
Is there any method for disabled browser/client validation?
Hey @Azad Furkan ŞAKAR - If you’re looking to disable browser/client-side validation, you could add the novalidate attribute to all Filament forms. If you already have a service provider, like App\Providers\AppServiceProvider, you could modify it instead of creating a new one.
4 replies
->searchable() pages blank
Hey @Enter - I see why you might think this issue is related to search functionality, but I have a theory that the black screen issue might actually be tied to Livewire v3.5.18 which seems to have introduced a bug affecting modals.
To test this theory, you could try requiring Livewire v3.5.12, which doesn’t seem to have this problem.
Update your
composer.json
to require v3.5.12
Dont forget to run a composer update for livewire
Once you’re back on v3.5.12, see if the modal works properly.10 replies
Moving everything in /app to /something_else
Hey @Sophist-UK
You’re correct that Laravel and its ecosystem uses the
App
namespace and /app
directory. Its designed to be customizable and won’t get overwritten during updates, so moving things around and tweaking the namespace should be fine.
If you want to change the namespace (like to CustomApp
), just update your composer.json
like this:
If you do this dont forget to run composer dump-autoload
. Filament itself shouldn’t care about the namespace, but if you’re using plugins or third-party packages, it’s worth checking if they make any assumptions about App. For your code generator, it’s a good idea to detect the namespace dynamically, so it works no matter what setup someone has.23 replies
Trying to dynamically disable file input, when checkbox is checked
Hey @Jpac14
It looks like the issue might be related to how the
TenantFileUpload
component processes the disabled()
logic dynamically. File inputs in Filament don’t always respond the same way as text inputs when state changes, which could be why your checkbox logic isn’t working as expected.
Give this a try, its just my two cents so it may or may not work.
I am thinking that by adding the extraAttributes
property, you can use Alpine.js (x-bind
) to directly control the disabled
attribute on the file input. This works should dynamically with your checkbox state and avoids limitations with Filament's built-in logic.
ofc, you will also need to make sure that Alpine.js is included in your project.10 replies
Undefined array key 1
Good Morning @raheel3031 - I am gonna throw my two cents in and you can take it for what you think its worth.
It seems to me when reading the code you posted that the error is with
$urls = $idToUrlsMapping[$page->id];
Maybe update your code to have a fallback if $page->id
is missing.
Again this was just my two cent when looking at what you provided.
Edit: If you wrong your code with 3x ` then its easier to read.
The error might be triggered turing Config/Route clearing because the removeUrlsOf() method is invoked during route clearing, likely via:
Make sure the Page models that are being passed exist and are valid.22 replies