Mocus
Mocus
Explore posts from servers
FFilament
Created by Mocus on 3/26/2024 in #❓┊help
InfoList Repeatable Entry Eloquent Children
so i have a $record -> repeater -> $record.child but i can't access the children in my repeater? going over the forums allot of questions asked but none seem to get answered.. example code:
return $infolist
->schema([
TextEntry::make('types.typeName')
->placeholder('types.description')
->hiddenLabel()
->columnSpanFull(),
RepeatableEntry::make('activities.activitytype.activityName') <---- MAKES 5 PANELS FINE
->schema([
TextEntry::make('typeID'), <------- DOES NOT APPEAR | TRIED WITH ELOQUENT, MODELS ARE LINKED FINE.
]),
]);
return $infolist
->schema([
TextEntry::make('types.typeName')
->placeholder('types.description')
->hiddenLabel()
->columnSpanFull(),
RepeatableEntry::make('activities.activitytype.activityName') <---- MAKES 5 PANELS FINE
->schema([
TextEntry::make('typeID'), <------- DOES NOT APPEAR | TRIED WITH ELOQUENT, MODELS ARE LINKED FINE.
]),
]);
1 replies
FFilament
Created by Mocus on 3/25/2024 in #❓┊help
ImageColumn not displaying .png
so i have a table and trying to use a image:
ImageColumn::make('image_attribute')
->url(asset('Types/10039_32.png'))
->circular(),
ImageColumn::make('image_attribute')
->url(asset('Types/10039_32.png'))
->circular(),
i have my Types folder with images in public folder but it's not loading them
8 replies
FFilament
Created by Mocus on 3/23/2024 in #❓┊help
Add info list to Page (with no resource)
I've read through the docos ... i've created a page with no resource and edited the pages/page.php like so
<?php

namespace App\Filament\App\Pages;

use Filament\Infolists\Components\TextEntry;
use Filament\Infolists\Infolist;
use Filament\Pages\Page;

class bpa extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.app.pages.bpa';

public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->state([
'name' => 'MacBook Pro',
'category' => [
'name' => 'Laptops',
],
// ...
])
->schema([
TextEntry::make('name'),
TextEntry::make('category.name'),
// ...
]);
}
}
<?php

namespace App\Filament\App\Pages;

use Filament\Infolists\Components\TextEntry;
use Filament\Infolists\Infolist;
use Filament\Pages\Page;

class bpa extends Page
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.app.pages.bpa';

public static function infolist(Infolist $infolist): Infolist
{
return $infolist
->state([
'name' => 'MacBook Pro',
'category' => [
'name' => 'Laptops',
],
// ...
])
->schema([
TextEntry::make('name'),
TextEntry::make('category.name'),
// ...
]);
}
}
but this isnt displaying, i get the nav link fine thou
22 replies
FFilament
Created by Mocus on 3/22/2024 in #❓┊help
new to PHP and Filament, can backwards engineer the database i have?
Hi All, i learn best when i dive in, im new to PHP, learning as i go. i've installed a new app with filamemt. i have a good idea what i want to make. i have a sqlite DB already i was wondering if there is away to work backwords with this and generate the models from the database. if this isnt possible is there away for me to generate the models from YAML files? thanks in advance for any advice, im excited to start diving in :)
10 replies