Mocus
Mocus
Explore posts from servers
FFilament
Created by Mocus on 3/25/2024 in #❓┊help
ImageColumn not displaying .png
for anyone else looking to do the same, looks like the way to do this:
ImageColumn::make('avatar')
->default(fn ($record) => asset("Types/{$record->types->typeID}_64.png"))
ImageColumn::make('avatar')
->default(fn ($record) => asset("Types/{$record->types->typeID}_64.png"))
8 replies
FFilament
Created by Mocus on 3/25/2024 in #❓┊help
ImageColumn not displaying .png
im no pro, but can i access the $record attribute in this field to something like {typeID}
8 replies
FFilament
Created by Mocus on 3/25/2024 in #❓┊help
ImageColumn not displaying .png
yeah i just figured out the default is what i need -.- silly me!
8 replies
FFilament
Created by Mocus on 3/25/2024 in #❓┊help
ImageColumn not displaying .png
update: i've inspected the element in chrome and can see the HTML code there, with a resource link which when i click on takes me to the image and loads fine.
8 replies
FFilament
Created by Mocus on 3/23/2024 in #❓┊help
Add info list to Page (with no resource)
so after a few hours trying i can see how you use the model from your resrouce in this
22 replies
FFilament
Created by Mocus on 3/23/2024 in #❓┊help
Add info list to Page (with no resource)
this doesnt explain how i access the mode from the resource, the resource is exposed but i cant access it using record/model/modelname
22 replies
FFilament
Created by Mocus on 3/23/2024 in #❓┊help
Add info list to Page (with no resource)
ok awsome thats working now with a plan list, next how do i inject/use my $model property from the resource?
22 replies
FFilament
Created by Mocus on 3/23/2024 in #❓┊help
Add info list to Page (with no resource)
aha finally!
22 replies
FFilament
Created by Mocus on 3/23/2024 in #❓┊help
Add info list to Page (with no resource)
so i now have in my sort-b-p.blade.php file:
@livewire('sort-b-p')
<x-filament-panels::page>
{{ $this->infolist }}
</x-filament-panels::page>
@livewire('sort-b-p')
<x-filament-panels::page>
{{ $this->infolist }}
</x-filament-panels::page>
22 replies
FFilament
Created by Mocus on 3/23/2024 in #❓┊help
Add info list to Page (with no resource)
ok, so i've added @livewire('sort-b-p-o') to my page, not it errors saying it cant find component?
22 replies
FFilament
Created by Mocus on 3/23/2024 in #❓┊help
Add info list to Page (with no resource)
my page loads but it's empty
22 replies
FFilament
Created by Mocus on 3/23/2024 in #❓┊help
Add info list to Page (with no resource)
No description
22 replies
FFilament
Created by Mocus on 3/23/2024 in #❓┊help
Add info list to Page (with no resource)
i've add them to the custom page php?
implements HasForms, HasInfolists
implements HasForms, HasInfolists
is that not the right way?
22 replies
FFilament
Created by Mocus on 3/23/2024 in #❓┊help
Add info list to Page (with no resource)
still no luck with this, any idea's?
22 replies
FFilament
Created by Mocus on 3/23/2024 in #❓┊help
Add info list to Page (with no resource)
No description
22 replies
FFilament
Created by Mocus on 3/23/2024 in #❓┊help
Add info list to Page (with no resource)
so just an update, i've created a CustomePage -> with Resource this is my page:
@livewire('view-product')
<div>
{{ $this->someList }}
{{-- If your happiness depends on money, you will never be happy with yourself. --}}
</div>
@livewire('view-product')
<div>
{{ $this->someList }}
{{-- If your happiness depends on money, you will never be happy with yourself. --}}
</div>
and this is my customPages class php
class ListItem extends Page implements HasForms, HasInfolists
{
use InteractsWithForms;
use InteractsWithInfolists;

protected static string $resource = IndustryblueprintsResource::class;

protected static string $view = 'filament.app.resources.industryblueprints-resource.pages.list-item';

public static function someList(Infolist $infolist): Infolist
{
return $infolist
->state([
'name' => 'MacBook Pro',
'category' => [
'name' => 'Laptops',
],
// ...
])
->schema([
TextEntry::make('name'),
TextEntry::make('category.name'),
// ...
]);
}
}
class ListItem extends Page implements HasForms, HasInfolists
{
use InteractsWithForms;
use InteractsWithInfolists;

protected static string $resource = IndustryblueprintsResource::class;

protected static string $view = 'filament.app.resources.industryblueprints-resource.pages.list-item';

public static function someList(Infolist $infolist): Infolist
{
return $infolist
->state([
'name' => 'MacBook Pro',
'category' => [
'name' => 'Laptops',
],
// ...
])
->schema([
TextEntry::make('name'),
TextEntry::make('category.name'),
// ...
]);
}
}
i've adjusted my resource route like so 'index' => Pages\ListItem::route('/'), so when i click on the link it takes me to this page but the damn info list isnt showing and it's really got me stumped.
22 replies
FFilament
Created by Mocus on 3/23/2024 in #❓┊help
Add info list to Page (with no resource)
the way im readying the doco's is if i make a custome view for the resource i shouldnt need to?
22 replies