add widget inside the table view

Hello, i want to add chart widget inside table view. like when i click row and go view i want to show this item widget. down size somewehere... is there any good plugin for make it simple? or anything ? i try to create widget inside
Supplier Resource
Supplier Resource
write default code which is written in documentation, also next i add
protected function getContent(): array
{
return [
SupplierWidget::class,
];
}
protected function getContent(): array
{
return [
SupplierWidget::class,
];
}
this code in viewSupplier but its not showing.. any ideas how i can make it simple and good ?
No description
15 Replies
gigiloouu
gigiloouuOP3mo ago
anyone can helpme?
toeknee
toeknee3mo ago
Just render it with the ViewField ?
gigiloouu
gigiloouuOP3mo ago
Like to be clear..
gigiloouu
gigiloouuOP3mo ago
No description
gigiloouu
gigiloouuOP3mo ago
i have supplier table when i click let's say id 0 its going view page
gigiloouu
gigiloouuOP3mo ago
No description
gigiloouu
gigiloouuOP3mo ago
like this where u just can view detail and this page i want to add widget down of this inputs be a some chart widget
<?php

namespace App\Filament\Resources\SupplierResource\Pages;

use App\Filament\Resources\SupplierResource;
use App\Filament\Resources\SupplierResource\Widgets\SupplierWidget;
use Filament\Actions\DeleteAction;
use Filament\Actions\EditAction;
use Parallax\FilamentComments\Actions\CommentsAction;

use Filament\Resources\Pages\ViewRecord;

class ViewSupplier extends ViewRecord
{
protected static string $resource = SupplierResource::class;

protected function getHeaderActions(): array
{
$actions[] = EditAction::make();
$actions[] = DeleteAction::make();

return $actions;
}

protected function getContent(): array
{
return [
view('filament.widgets.supplier-widget'),
];
}

}
<?php

namespace App\Filament\Resources\SupplierResource\Pages;

use App\Filament\Resources\SupplierResource;
use App\Filament\Resources\SupplierResource\Widgets\SupplierWidget;
use Filament\Actions\DeleteAction;
use Filament\Actions\EditAction;
use Parallax\FilamentComments\Actions\CommentsAction;

use Filament\Resources\Pages\ViewRecord;

class ViewSupplier extends ViewRecord
{
protected static string $resource = SupplierResource::class;

protected function getHeaderActions(): array
{
$actions[] = EditAction::make();
$actions[] = DeleteAction::make();

return $actions;
}

protected function getContent(): array
{
return [
view('filament.widgets.supplier-widget'),
];
}

}
there is my view supplier code i try many ways with blade als o only widget usiginf filament widget but not works its not showing anything
toeknee
toeknee3mo ago
If going into a view page... why not just add the widget to the page widgets?
gigiloouu
gigiloouuOP3mo ago
i try like this
<?php

namespace App\Filament\Resources\SupplierResource\Pages;

use App\Filament\Resources\SupplierResource;
use App\Filament\Resources\SupplierResource\Widgets\SupplierWidget;
use Filament\Actions\DeleteAction;
use Filament\Actions\EditAction;

use Filament\Resources\Pages\ViewRecord;

class ViewSupplier extends ViewRecord
{
protected static string $resource = SupplierResource::class;

protected function getHeaderActions(): array
{
$actions[] = EditAction::make();
$actions[] = DeleteAction::make();

return $actions;
}

protected function getContent(): array
{
return [
myWidget::class
];
}

}
<?php

namespace App\Filament\Resources\SupplierResource\Pages;

use App\Filament\Resources\SupplierResource;
use App\Filament\Resources\SupplierResource\Widgets\SupplierWidget;
use Filament\Actions\DeleteAction;
use Filament\Actions\EditAction;

use Filament\Resources\Pages\ViewRecord;

class ViewSupplier extends ViewRecord
{
protected static string $resource = SupplierResource::class;

protected function getHeaderActions(): array
{
$actions[] = EditAction::make();
$actions[] = DeleteAction::make();

return $actions;
}

protected function getContent(): array
{
return [
myWidget::class
];
}

}
something like this but not working i google it see use gpt but not workss
gigiloouu
gigiloouuOP3mo ago
okay but if i want to be this widget in te view page where i should aadd in viewSupplier component? just same as there is ?
gigiloouu
gigiloouuOP3mo ago
No description
gigiloouu
gigiloouuOP3mo ago
its so big like i give it columnspan 2 and height is too big i just want to be width 100vw and height normal d
toeknee
toeknee3mo ago
Set the widget columns and set a max height for the widget
Want results from more Discord servers?
Add your server