antiquarian_capsaicin
antiquarian_capsaicin
FFilament
Created by antiquarian_capsaicin on 1/23/2024 in #❓┊help
Displaying multiple images uploaded from SpatiesMediaLibrary intp a blade file
SpatieMediaLibraryFileUpload::make('images') ->multiple(), Blade File @foreach ($item as $item) <div class="bg-white p-6 rounded-md shadow-md transition-transform transform hover:scale-105"> <img src="{{$item->images}}" alt="Card Image" class="w-full h-32 object-cover mb-4 rounded-md"> <h3 class="text-xl font-semibold mb-2">{{$item->name}}</h3> <p class="text-gray-700">{{$item->name}}</p> <a href="{{url('details', $item->id)}}"> <button class="mt-4 bg-blue-500 text-white px-4 py-2 rounded-md hover:bg-blue-600 transition-colors">Learn More</button> </a> </div> @endforeach Images don't show up in the blade file
5 replies
FFilament
Created by antiquarian_capsaicin on 12/6/2023 in #❓┊help
Tabs to filter the records(Panel Builder) not working
use Filament\Resources\Components\Tab;
use Illuminate\Database\Eloquent\Builder;

public function getTabs(): array
{
return [
'all' => Tab::make('All Applicants')
->badge(CourseApplication::query()->count())
->icon('heroicon-m-user-group'),
'part' => Tab::make('Part Payment')
->icon('heroicon-m-beaker')
->badge(CourseApplication::query()->whereRaw("cost > 0 And cost > paid")->count())
->modifyQueryUsing(fn(Builder $query) => $query->whereRaw("cost > 0 And cost > paid")),
'full' => Tab::make('Full Payment')
->badge(CourseApplication::query()->whereRaw("cost = paid")->count())
->modifyQueryUsing(fn(Builder $query) => $query->whereRaw("cost = paid"))
->icon('heroicon-m-banknotes'),
];
}
use Filament\Resources\Components\Tab;
use Illuminate\Database\Eloquent\Builder;

public function getTabs(): array
{
return [
'all' => Tab::make('All Applicants')
->badge(CourseApplication::query()->count())
->icon('heroicon-m-user-group'),
'part' => Tab::make('Part Payment')
->icon('heroicon-m-beaker')
->badge(CourseApplication::query()->whereRaw("cost > 0 And cost > paid")->count())
->modifyQueryUsing(fn(Builder $query) => $query->whereRaw("cost > 0 And cost > paid")),
'full' => Tab::make('Full Payment')
->badge(CourseApplication::query()->whereRaw("cost = paid")->count())
->modifyQueryUsing(fn(Builder $query) => $query->whereRaw("cost = paid"))
->icon('heroicon-m-banknotes'),
];
}
Error- Use of unknown class:Filament\Resources\Tab
7 replies
FFilament
Created by antiquarian_capsaicin on 11/23/2023 in #❓┊help
Custom styles
public function table(Table $table): Table
{
return $table
->query(Course::query())
->columns([

Stack::make([
ImageColumn::make('image')
->width(400)
->height(300)
//->extraAttributes(['class' => 'h-auto', 'm-auto', 'rounded-lg', 'sm:w-32'])
->toggleable(),
// ->size(370),
Grid::make([
'sm' => 2,
'xl' => 2,
'2xl' => 2,
])->schema([
ImageColumn::make('image')->circular()->extraAttributes(['class' => 'mt-2', 'sm:w-80', 'sm:m-0']),
TextColumn::make('name')
->extraAttributes(['class' => 'mt-2', 'text-4xl'])
->weight(FontWeight::Black)
->size(TextColumnSize::Large)
->searchable(),
])->extraAttributes(['class' => 'gap-0']),

TextColumn::make('details')
->searchable()
->weight(FontWeight::SemiBold)
->size(TextColumnSize::Medium)
->toggleable(isToggledHiddenByDefault: true)
->extraAttributes(['class' => 'my-4']),
])->extraAttributes(['style' => 'max-width:720px', 'max-w-screen-lg', 'class' => 'bg-blue-200']),

])
->contentGrid([
'md' => 3,
'sm' => 2,
])

}
public function table(Table $table): Table
{
return $table
->query(Course::query())
->columns([

Stack::make([
ImageColumn::make('image')
->width(400)
->height(300)
//->extraAttributes(['class' => 'h-auto', 'm-auto', 'rounded-lg', 'sm:w-32'])
->toggleable(),
// ->size(370),
Grid::make([
'sm' => 2,
'xl' => 2,
'2xl' => 2,
])->schema([
ImageColumn::make('image')->circular()->extraAttributes(['class' => 'mt-2', 'sm:w-80', 'sm:m-0']),
TextColumn::make('name')
->extraAttributes(['class' => 'mt-2', 'text-4xl'])
->weight(FontWeight::Black)
->size(TextColumnSize::Large)
->searchable(),
])->extraAttributes(['class' => 'gap-0']),

TextColumn::make('details')
->searchable()
->weight(FontWeight::SemiBold)
->size(TextColumnSize::Medium)
->toggleable(isToggledHiddenByDefault: true)
->extraAttributes(['class' => 'my-4']),
])->extraAttributes(['style' => 'max-width:720px', 'max-w-screen-lg', 'class' => 'bg-blue-200']),

])
->contentGrid([
'md' => 3,
'sm' => 2,
])

}
extraAttributes for image column doesn't work. How do i make it work? Also some just don't work
9 replies
FFilament
Created by antiquarian_capsaicin on 11/16/2023 in #❓┊help
Custom theme for a livewire component using a filament resource table
So I used a filament table to populate a livewire component and I'm trying to get it to display a custom theme but it doesn't work
17 replies
FFilament
Created by antiquarian_capsaicin on 11/13/2023 in #❓┊help
create option form error
Filament\Support\Services\RelationshipJoiner::prepareQueryForNoConstraints(): Argument #1 ($relationship) must be of type Illuminate\Database\Eloquent\Relations\Relation, null given, called in How do i fix
6 replies
FFilament
Created by antiquarian_capsaicin on 10/19/2023 in #❓┊help
Tailwindcss not working
So tailwindcss isn't working in my project. Saw someone with a similar problem in #👹┊off-topic with a reply but it didn't work. It was to run npm run build. Still didn't work
2 replies