Comments (3)
Hi, Thanks for your kind response. By the way, I just found another solution for this, but it will not be using the pre-made component and traits u made from this project. But it's a pretty (direct solution) with few customization and a little help of few CDN and jQuery. Just want to share this here if someone later, can find this useful as an option for using datatables in this project.
CSS :
https://cdnjs.cloudflare.com/ajax/libs/datatables.net-bs4/1.1.0/dataTables.bootstrap4.css
https://cdnjs.cloudflare.com/ajax/libs/datatables.net-select-bs4/1.3.3/select.bootstrap4.css
JS :
https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js
https://cdn.datatables.net/1.10.25/js/dataTables.bootstrap4.min.js
https://cdn.datatables.net/select/1.3.1/js/select.bootstrap4.min.js
UserController.php :
dashboard.blade.php
dashboard-table.blade.php
Outcome :
from laravel-8-stisla-jetstream.
Thank you, and good question. I never try this solution before, but it still make sense i think. So if you made a HTTP API request inside of Laravel / Livewire Component you can place it on app\Http\Livewire\Table\Main.php
. But we have another problem, to use Livewire\WithPagination
we must have data with typeof Illuminate\Pagination\Paginator
from Laravel. I think, you need to convert your HTTP API response to Paginator first before Livewire can use it.
And i also consider if you mean is to make a request from the client side. You can call an API first from Javascript and passed it into Livewire component using @this.emit
or @this.call
methods and process it on Livewire Component. And again you must convert data response into Paginator first.
References:
- https://laravel.com/docs/8.x/pagination#manually-creating-a-paginator
- https://laravel-livewire.com/docs/2.x/pagination
- https://laravel-livewire.com/docs/2.x/events
from laravel-8-stisla-jetstream.
Wow, It's look awesome. Thanks for sharing the solution to us. I will leave this issue/question open for now, just in case someone have similar case like you. Good job @lordnaz, appreciate it.
from laravel-8-stisla-jetstream.
Related Issues (13)
- Password plaintext not bcrypt hash while create new user HOT 1
- Bisakah Stisla ini di aplikasikan untuk SPA ? HOT 1
- Trying to access array offset on value of type null HOT 3
- Teams? How do I add teams support? HOT 2
- Question: why add tailwindcss? HOT 6
- Problem with login HOT 1
- CLOSED
- email verification
- Suggestion: Voyager admin like replacement? HOT 1
- Many to many eloquent HOT 2
- Letak component stisla
- Letak component stisla HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-8-stisla-jetstream.