jjo63
Is it possible to add a badge to top line with a number on it?
I can see in the filament demo there is a bell icon with a number just above - i'd like to implement something similar using a different icon - could anyone point me to what I need to be reading in the documentation?
Clicking the bell in the demo opens a slideover with a list of the items contained within - that's what I'd like to be able to implement albeit with a different icon.
Thx for pointers,
j
4 replies
Edit form without fields
I know, it sounds daft, but I was wondering if the edit form (which I have implemented as a slideover) and from which I have removed the ability to edit any fields can be displayed without field boundaries - there is a default size for each field, some are very short content others are potentially more lengthy text. I wondered if it is possible to apply an attribute that would result in the fields actually not being displayed and whatever content is behind then just being displayed without any length constraints?
Is there a different type of resource i should generate and use (and can it be accessed in the same kind of way as a slideover (not critical, but nice)?
thx all,
j
6 replies
Help! Unable to access variable values from .env
This is really bizarre. And perhaps more of a Laravel question now I think about it. But...
My Filament app is able to connect to a database and display e.g. the APP_NAME - so I know that the .env file is present and has been read by Laravel /Filament core code.
But - I cannot access the values from within e.g. a Widget.
I have this line of code
Log::info('APP_NAME:' . env('APP_NAME'));
and it results in output
[2024-10-17 11:45:50] local.INFO: APP_NAME:
Even though the APP_NAME is clearly displayed (and has a value in the .env file) by Filament.
All my code which is trying to access other variables (I was just using APP_NAME as an example) has "suddenly stopped working" - and I am thoroughly perplexed.
Here is a little routine that proves the existence of the file:
But the echo of env('APP_URL') at the end gives nothing. Here is the script's output
$ php test.php APP_NAME="HCAT DB SYSTEM" APP_ENV=local APP_KEY=base64:4xxxxxxxxxxxxxxxx= APP_DEBUG=true APP_URL=https://xxxxxxxxxxxx ... ... ... FINALLY:Any clues anyone?
18 replies
Application load failure on Safari but OK on Chrome
Hi all, bit of an odd one this. I developed originally using the php server and all was good. I then wanted to make the app accessible to a wider audience for evaluation and so I configured apache and setup SSL etc. The issue occurs on logging in:
If I login to the app on Safari using the php server (port 8000) all OK.
If I login to the app on Safari using apache (443) I get an error.
If I login to the app on Chrome using apache (443) all OK.
The error is
The POST method is not supported for route admin/login. Supported methods: GET, HEAD.
Any thoughts or experience of this?
thanks
j13 replies
searchable() - accessing the search terms entered / context of results
Hi is it possible to access the search string entered in the free text box? I'm interested in being able to pull out the context of the data where the entered search terms match, It seems like a very clever bit of coding within Filament which enables matching using the entered words even when the words are not consecutive.
My objective is to be able to show the user (ideally in a column in the "table view") the underlying data on which the match was made (context).
For example the user types in "table mountain" and the context might be "The walkers hiked all the way to the top of Table Mountain in the searing midday heat" - so would be great to be able to pull out x words before and after the search term. Is such a thing possible?
1 replies
Changed behaviour of button after data change in table
Please look at the movie attached.
The first time I click the "view document" button the modal pops up - and I can navigate with prev / next buttons through the records in the Filament table. I can close the modal and click a different row's button and the modal reopens.
However when I change the data (e.g. apply a filter or page the results) the behaviour changes and the document opens taking the whole browser window (i.e. the modal is no longer used).
Any tips on where to look first?
thx
j
22 replies
Generating some template (e.g. DIV) into a Table resource view
Hi as I understand it there are "render hooks" that can be used to inject some additional content in different places on different types of page.
I have a resource called ArchFile and when we present the table of records I'd like (within that page) to be able to include some additional HTML (defines some divs needed for a modal iframe).
My knowledge again is inadequate to understand how to achieve this. I was reading here https://filamentphp.com/docs/3.x/support/render-hooks
and thought that this would be an appropriate use for my needs:
The documentation says
To register render hooks, you can call FilamentView::registerRenderHook() from a service provider or middleware.I am not sure what that means but I'm guessing that my ArchFileResource.php file is not the place. In a default install of Filament, where might i add this code? Thanks for all help & comments, j
4 replies
Styling a custom column
Hi I have a custom column used in a table like this
I was assuming (wrongly 🙂 ) that I could style it using the options available on text columns (e.g.
->badge
() ) but see that this is not valid.
Is there a standard way of enabling such styling options?
thanks
j3 replies
->description() - is it possible to further style?
Table columns and using the ->description() method (correct term?) for example like this
Is it possible to apply styling to the description (such as
badge
and setting a colour)? I don't think that description()
supports this natively and am sure that there is a method to further style using some kind of custom code but wouldn't know where to start on this. Any pointers?
thx
j6 replies
GetStateUsing - when can it be used? One example that works, one that doesn't
Hi all, GetStateUsing - have found this useful - here is an example of it being used to retrieve the description from an array - and this works beautifully
In this case we are displaying the name of a file and underneath (in the description) pulling the name of the folder based on its entry in an array
$folders
I thought that I could make the folder name itself a column by doing this
When I run this version the browser just hangs eventually saying it's unable to get a response - and the php http server will not respond to any other requests until I kill & restart it.
Is my use of GetStateUsing in example 2 incorrect?
No errors reported in storage/logs/laravel.log nor in the php http server output.
thanks - not critical (I can workaround) but thought I'd flag it to see if it's my error or ...,
j6 replies
Hide Resources from Panel
Hi I am sure this is simple but cannot see how this is achieved. Say I have a resource "pets" - I get a number of php dfiles generated for this and a link is added to the admin panel - this all happens automatically. I'm doing POC stuff and I'd like to keep what I have (code for reference) but not have the resources cluttering up my admin panel - what's the method (short of deleting the files) to remove them from the view of the user?
I guess one option would be to create a new Laravel app 🙂 or to create a new admin panel - but just wanted to know if there is a simple way to achieve the hiding of resources that you don't actually want to see?
thanks
j
4 replies
Generic process for installing plugins?
Hi a little confused - I wanted to use this plugin
https://github.com/solutionforest/Filament-SimpleLightBox
I ran the composer command
No problems.
I modified my file app/Providers/Filament/AdminPanelProvider.php to add the line referencing the plugin
When I tried to reload my app, I get an error
Class "App\Providers\Filament\SimpleLightBoxPlugin" not found
As there were no other installation / pre-req usage instructions I wondered whether this is me being ignorant of some typical steps you'd follow or if this is actually an issue with the installation of the plugin.
Any pointers?
thanks
j6 replies
ToggleColumn - making conditionally invisible
Hi I have the following code snippet
In the I can access $record - but within I am unable to (i.e. generates an error - "Attempt to read property "record_type" on null").
I don't understand why $record isn't universally available to me - but accepting that's the case, how would I access the current record within the method so that I can determine whether the toggle should be shown or not?
thanks for your help!
j
8 replies
Invalid SQL Generated when using Relation Manager
Hi folks, I was interested to explore this. I issued this command
and then registered the relation. When I execute the app I am getting this SQL being generated:
It should read like this
I cannot see where it's looking when generating the SQL that could result in it determining that there is a column called
Anyone able to help?
thx
J
14 replies