Adding a table to a Livewire component

I followed the steps that are in https://filamentphp.com/docs/3.x/tables/adding-a-table-to-a-livewire-component to create a filement table inside a livewire component. I tried both ways, from terminal with livewire:make and making a route in web.php. When i render the page it seems like the javascript and css is not working (wire:click does not make request to server). I don't get any errors in the console and nothing is being done in the network tab. This is what is shown in the view Is there any way to fix this?
No description
Solution:
ok, but you should also import filamentStyles and filamentScripts in the layout..
Jump to solution
4 Replies
Nikos Koukos
Nikos KoukosOP7mo ago
I have already done
composer require filament/filament:"^3.2" -W

php artisan filament:install --panels
composer require filament/filament:"^3.2" -W

php artisan filament:install --panels
Because i already have an admin panel for my project and i wanted to add a table to the front.
Solution
LeandroFerreira
LeandroFerreira7mo ago
ok, but you should also import filamentStyles and filamentScripts in the layout..
Nikos Koukos
Nikos KoukosOP7mo ago
Perfect i needed to add them to the app layout and also to do this
npm install tailwindcss @tailwindcss/forms @tailwindcss/typography postcss postcss-nesting autoprefixer --save-dev
npm install tailwindcss @tailwindcss/forms @tailwindcss/typography postcss postcss-nesting autoprefixer --save-dev
and
import preset from './vendor/filament/support/tailwind.config.preset'

export default {
presets: [preset],
content: [
'./app/Filament/**/*.php',
'./resources/views/filament/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
],
}
import preset from './vendor/filament/support/tailwind.config.preset'

export default {
presets: [preset],
content: [
'./app/Filament/**/*.php',
'./resources/views/filament/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
],
}
Thank you
Want results from more Discord servers?
Add your server