jjo63
jjo63
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
FFilament
Created by jjo63 on 9/9/2024 in #❓┊help
Application load failure on Safari but OK on Chrome
OK. Interesting! Worked in private mode.
13 replies
FFilament
Created by jjo63 on 9/9/2024 in #❓┊help
Application load failure on Safari but OK on Chrome
(sorry for the curt reply 🙂 )
13 replies
FFilament
Created by jjo63 on 9/9/2024 in #❓┊help
Application load failure on Safari but OK on Chrome
No
13 replies
FFilament
Created by jjo63 on 9/9/2024 in #❓┊help
Application load failure on Safari but OK on Chrome
Also - on the loging page, the password fields are not protected with * - the password is always clearly visible as you type in Safari - again, this is different in Chrome (where it behaves as expected).
13 replies
FFilament
Created by jjo63 on 9/9/2024 in #❓┊help
Application load failure on Safari but OK on Chrome
Here is a link to the Flare https://flareapp.io/share/xmNee0Q5
13 replies
FFilament
Created by jjo63 on 8/21/2024 in #❓┊help
Changed behaviour of button after data change in table
No description
22 replies
FFilament
Created by jjo63 on 8/21/2024 in #❓┊help
Changed behaviour of button after data change in table
That generates Undefined variable $file_id
22 replies