jjo63
jjo63
FFilament
Created by jjo63 on 1/2/2025 in #❓┊help
Custom page - invoking "standard" resource features
Am closing this now as I have redesigned my solution after watching some Laracast video content. Issue I have to solve is now I think much simpler - I started a new discussion for this entitled "Infolists / Action button"
8 replies
FFilament
Created by jjo63 on 1/2/2025 in #❓┊help
Custom page - invoking "standard" resource features
Thanks for the pointers - been away on other tasks for a couple of days but am now back on this. So I have code that seems syntactically right but doesn't do as I want. In essence, I click a button in the blade defined thus: <div> <x-filament::button label="View" wire:click="slideObjAction({{ $result->id }})" /> <x-filament-actions::modals /> </div> Then the function slideObjAction is defined in my controller public function slideObjAction($id): Action { $record = ArchObject::find($id); $infolist = ArchObjectResource::infolist(Infolist::make()->record($record)); log::info('About to return view'); return Action::make('view') ->label('View Details') ->action(function () use ($infolist) { // Fetch the model using the ID $this->infolist($infolist); }) ->slideOver(); } When I click the button "nothing happens" and I don't see anything in laravel.log nor in the browser console to help diagnose the problem. Any ideas?
8 replies
FFilament
Created by jjo63 on 1/2/2025 in #❓┊help
Custom page - invoking "standard" resource features
OK thanks - how would i see what args have to be passed to the infolist() function - is that documented somewhere or is it a case of digging out the core filament code and habving a look at it?
8 replies
FFilament
Created by jjo63 on 1/1/2025 in #❓┊help
Livewire / Custom Page issue / skipRender not functioning?
Thanks - in fact I think I have misunderstood something AND have therefore mis-represented my problem - there are some oddities in the UI but skipRender() is functioning. Going to close this request and open another if (armed with my additional discovery this morning) i still have an issue to resolve. Appreciate the input (oh and yes, there is to come some DB updates but I'm very confident in that area, it was the fundamentals of the UI/UX that I wanted to get nailed first).
4 replies
FFilament
Created by jjo63 on 12/14/2024 in #❓┊help
Building own "resource" to run within the Filament UI
This block of code public function render(): View { return view('filament.pages.custom-search'); } with this piece of code, I was presented at runtime with a completely unstyled form. When I commented out this function, my form was displayed within the context and styling of the rest of the Filament app. I think this serves as a warning again to take care when using AI to generate code, especially when the language or framework is unfamiliar as it took me quite some time to unravel why I had no styling.
10 replies
FFilament
Created by jjo63 on 12/14/2024 in #❓┊help
Building own "resource" to run within the Filament UI
Thanks for the suggestion, not getting too far with this (own lack of knowledge probably though I know that AI-generated code can be spot-on sometimes and lead you down many rabbit holes when it isn't 🙂 Cannot judge if it's my problem or the suggested code's problem but am hitting many obstacles. Will feedback when I have it unravelled.
10 replies
FFilament
Created by jjo63 on 12/14/2024 in #❓┊help
Building own "resource" to run within the Filament UI
Thanks, of course that's exactly where I needed to start. My objective is to present a (text) search field which, upon submission, generates a query which will be executed within Supabase and renders a result set. The default search and result presentation of Filament tables isn't what I want so do need to code something for myself. Any pointers to a suitable "primer' video (or doc) for this? I do realise this is outside of Filament so am chancing my arm here on requesting a small amount of off-topic help 🙂
10 replies
FFilament
Created by jjo63 on 10/22/2024 in #❓┊help
Adding a record count alongside a navigation link
Is this the resolution to the request discussed here https://github.com/filamentphp/filament/discussions/7221 ?
10 replies
FFilament
Created by jjo63 on 10/22/2024 in #❓┊help
Adding a record count alongside a navigation link
Thanks patrick, I was literally about to update this as I had found the solution within the resouce file on github.
10 replies
FFilament
Created by jjo63 on 10/19/2024 in #❓┊help
Edit form without fields
That works perfectly - thanks @awcodes
6 replies
FFilament
Created by jjo63 on 10/19/2024 in #❓┊help
Edit form without fields
Thanks, that looks like exactly what I need - thanks for the pointer - particularly the heading of this section https://filamentphp.com/docs/3.x/panels/resources/viewing-records#using-an-infolist-instead-of-a-disabled-form
6 replies
FFilament
Created by jjo63 on 10/17/2024 in #❓┊help
Help! Unable to access variable values from .env
Looks like I may have been in a muddle - I can confirm that, as of now, my test script which contains the line
echo('Value:' . env('MAIL_FROM_ADDRESS') . PHP_EOL);
echo('Value:' . env('MAIL_FROM_ADDRESS') . PHP_EOL);
returned nothing. I then executed php artisan config :clear and the script returned the value from the .env file I then cached the config php artisan config:cache and the script returned nothing again So the config:clear and config:cache are working as I think was expected (not by me as this is new to me 🙁 ) and I will proceed to modify all references of env() with references to config() which in turn will find the values from a sharepoint.php file that I'm adding into the config directory. Thanks for your patience and help, j
18 replies
FFilament
Created by jjo63 on 10/17/2024 in #❓┊help
Help! Unable to access variable values from .env
Thanks Dennis - I guess mine stopped working after I executed a
php artisan config:cache
php artisan config:cache
Would that be right? If so, is there a way to restore the behaviour (I recognise that what I had was a really bad implementation that wouldn't have survived being put into production! - but I'd like to understand if possible to revert so that I can work my way through the code, fixing these uses of env() )?
18 replies
FFilament
Created by jjo63 on 10/17/2024 in #❓┊help
Help! Unable to access variable values from .env
Thanks for the info, really appreciate it.
18 replies
FFilament
Created by jjo63 on 10/17/2024 in #❓┊help
Help! Unable to access variable values from .env
Yes it was just an example - I have added additional variables that I need - I added these to .env (thinking that was the correct approach)
SHAREPOINT_TENANT_ID="xxxxxx" SHAREPOINT_CLIENT_ID="yyyyyy" SHAREPOINT_CLIENT_SECRET="zzzzz"
Then I referred to these when I needed them using e.g.
env('SHAREPOINT_TENANT_ID')
env('SHAREPOINT_TENANT_ID')
18 replies
FFilament
Created by jjo63 on 10/17/2024 in #❓┊help
Help! Unable to access variable values from .env
I have just read this:
If you execute the config:cache command during your deployment process, you should be sure that you are only calling the env function from within your configuration files. Once the configuration has been cached, the .env file will not be loaded; therefore, the env function will only return external, system level environment variables.
I am guessing this is what has caused my app to "suddenly stop working" Just trying to figure out how to revert things AND how to set my custom variables in a file in config directory.
18 replies
FFilament
Created by jjo63 on 10/17/2024 in #❓┊help
Help! Unable to access variable values from .env
Oh - ok - then that's something I need to read up on - however it was working and then mysteriously stopped. I don't want to persevere with code that is flaky because its behaviour may vary - where would I read up on the "right way" to do this?
18 replies
FFilament
Created by jjo63 on 10/17/2024 in #❓┊help
Help! Unable to access variable values from .env
yes, did already but to no avail.
18 replies
FFilament
Created by treii28 on 9/26/2024 in #❓┊help
Run a javascript function when table is redrawn
I had this same issue (i.e. I wanted to have a button on each row that did something custom)- solved it after many many attempts - I am not a js expert by any means but the following was the basis
if (tableContainer) {
// console.log("Table container found. Setting up MutationObserver");

const observer = new MutationObserver((mutationsList) => {
// console.log("MutationObserver detected changes in the table container");

for (let mutation of mutationsList) {
if (mutation.type === 'childList') {
// console.log("Child list changed. Reattaching document link listeners");
attachDocumentLinkListeners(); // Reattach listeners whenever the table changes
}
}
});

observer.observe(tableContainer, { childList: true, subtree: true });
// console.log("MutationObserver is now observing the table container");
} else {
// console.log("Table container not found! MutationObserver not set up.");
}
if (tableContainer) {
// console.log("Table container found. Setting up MutationObserver");

const observer = new MutationObserver((mutationsList) => {
// console.log("MutationObserver detected changes in the table container");

for (let mutation of mutationsList) {
if (mutation.type === 'childList') {
// console.log("Child list changed. Reattaching document link listeners");
attachDocumentLinkListeners(); // Reattach listeners whenever the table changes
}
}
});

observer.observe(tableContainer, { childList: true, subtree: true });
// console.log("MutationObserver is now observing the table container");
} else {
// console.log("Table container not found! MutationObserver not set up.");
}
It was all about targeting the correct elements and watching for changes there - and then executing the
attachDocumentLinkListeners
attachDocumentLinkListeners
function Let me know if you need to see any more of the solution and hope this does help sonewhat.
12 replies
FFilament
Created by jjo63 on 9/9/2024 in #❓┊help
Application load failure on Safari but OK on Chrome
Hmmm - well that's a complete mystery - i only had a few extensions - parallels desktop-related + "coupert" - I deleted all but one of these, restarted Safari and now it's behaving as expected. Bit of a nuisance as it's possible that other users in the future might hit this rather unusual combination and it'd be alarming for them to (a) see their password in clear text and (b) then get the error that I reported. I'm glad to see that it's resolved for me, here, but would be great to be able to look more deeply into what the problem is (as no other applications to my knowledge seem to be affected by the presence of browser extensions).
13 replies