jjo63
jjo63
FFilament
Created by jjo63 on 5/22/2024 in #❓┊help
Basic navigation from row in "parent" list to table of "children"
No description
1 replies
FFilament
Created by jjo63 on 5/18/2024 in #❓┊help
Invalid SQL Generated when using Relation Manager
Hi folks, I was interested to explore this. I issued this command
MyPropertyResource my_property_rooms room_name
MyPropertyResource my_property_rooms room_name
and then registered the relation. When I execute the app I am getting this SQL being generated:
SELECT
count(*) AS aggregate
FROM
`my_property_rooms`
WHERE
`my_property_rooms`.`my_property_my_property_id` = 6
AND `my_property_rooms`.`my_property_my_property_id` IS NOT NULL
SELECT
count(*) AS aggregate
FROM
`my_property_rooms`
WHERE
`my_property_rooms`.`my_property_my_property_id` = 6
AND `my_property_rooms`.`my_property_my_property_id` IS NOT NULL
It should read like this
SELECT
count(*) AS aggregate
FROM
`my_property_rooms`
WHERE
`my_property_rooms`.`my_property_id` = 6
AND `my_property_rooms`.`my_property_id` IS NOT NULL
SELECT
count(*) AS aggregate
FROM
`my_property_rooms`
WHERE
`my_property_rooms`.`my_property_id` = 6
AND `my_property_rooms`.`my_property_id` IS NOT NULL
I cannot see where it's looking when generating the SQL that could result in it determining that there is a column called
my_property_my_property_id
my_property_my_property_id
Anyone able to help? thx J
14 replies
FFilament
Created by jjo63 on 5/15/2024 in #❓┊help
Login page on mobile lacks styling
Hi when I access http://192.168.1.49:8000/admin or http://192.168.1.49:8000/app on my desktop, I get a styled login page. When I access http://192.168.1.49:8000/admin on mobile, I also get a styled login page. However when I access http://192.168.1.49:8000/app on mobile, I get an unstyled login page. The styling I see is default Filament stuff - I haven't done anything (to my knowledge) to alter this (aside from setting the default colour to be different between /app and /admin) - what might be the cause of the lack of styling? thx j
3 replies
FFilament
Created by jjo63 on 5/14/2024 in #❓┊help
Default columns in <resourcename>.php
Hi when I first started tinkering with Filament the <modelname>Resource.php file contained references to columns (fields) within the referenced model. I would then edit out the ones I didn't want. I want to use Filament on a new project but this time I note that the columns (fields) are not present - e.g. I see

public static function table(Table $table): Table
{
return $table
->columns([
//
->filters([
//
])

public static function table(Table $table): Table
{
return $table
->columns([
//
->filters([
//
])
Is there a setting I should be using to achieve what I assumed was default behaviour? Thanks 🙂 j
5 replies
FFilament
Created by jjo63 on 4/25/2024 in #❓┊help
Accessing the "admin portal" as different user types
Hi all, I wanted to use Filament for 2 different audiences - one is administering the system (users can be manually created as required) the other is those who would use it and would sign-up for use online (i.e. full self-service). I have already created the first kind of user (following the Filament setup instructions). Can I introduce the 2nd type of user to use the same portal? Any guides you can point me at that would explain how that would be achieved?
Thanks in advance, j
24 replies
FFilament
Created by jjo63 on 3/17/2024 in #❓┊help
Opening images from a URL in a list
Hi sorry if this is a question that is easily answered reading the docs - a pointer to the relevant part would be great if an answer is not forthcoming here 🙂 So I have a filament resource that is listing table contents - here is the function
public static function table(Table $table): Table
{
return $table
->columns([
Tables\Columns\TextColumn::make('id')
->label('ID')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('file_created')
->dateTime()
->sortable(),
Tables\Columns\TextColumn::make('file_updated')
->dateTime()
->sortable(),
Tables\Columns\TextColumn::make('filename')
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('url')
,
Tables\Columns\TextColumn::make('folder')->searchable()

->sortable(),
])
->filters([
//
])
->actions([
Tables\Actions\EditAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
]),
]);
}
public static function table(Table $table): Table
{
return $table
->columns([
Tables\Columns\TextColumn::make('id')
->label('ID')
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('file_created')
->dateTime()
->sortable(),
Tables\Columns\TextColumn::make('file_updated')
->dateTime()
->sortable(),
Tables\Columns\TextColumn::make('filename')
->searchable()
->sortable(),
Tables\Columns\TextColumn::make('url')
,
Tables\Columns\TextColumn::make('folder')->searchable()

->sortable(),
])
->filters([
//
])
->actions([
Tables\Actions\EditAction::make(),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(),
]),
]);
}
I am only displaying the url as I evolve this. I'd like the filename column to become a hypertext link which when clicked opens the url or an icon alongside it if that's the more current method. I'd like the link to be opened into a pop-up window (not a new browser window / tab) and ideally it would have "next / prev" options on it which would correspond to the next / previous records in the table as displayed at the time. I'm guessing this is easy to do and a common use case - pointers appreciated! many thanks, j
7 replies
FFilament
Created by jjo63 on 2/19/2024 in #❓┊help
Filament / Supabase - problem :(
No description
14 replies