Open penberg opened 1 year ago
I would like to see Laravel & PHP support. Here is my feature request for the Laravel Framework https://github.com/laravel/framework/discussions/49340
Hello Punk!
I build bunch of Turso/LibSQL Client for fun experiment and I love it! I am also build:
I've done building a Native LibSQL Extension/Driver/Whatever and I am try to package this driver into Laravel (but I need some help here :smile:). Since this is not an official PHP extension, I need to make it installable in the project.
This weekend May, 19 2024, I am done and re-think about what I am talking before. I just drunk stupid person but still; I am handsome. The LibSQL PHP Ext can be use stand-alone, this is the core dependency of LibSQL Client PHP.
Everything will be prepared when you install this extension. But, if you encountered an error; create an issue.
So with LibSQL PHP Ext features we can create custom LibSQL Driver for Laravel (but it's not support remote), remote connection still handle via HTTP SDK from LibSQL Client PHP.
So let me know, who want to join the party :tada: :rocket:
NOTE This party only for Linux & Mac/Darwin. But Windows can join when using WSL :smile:
I am also create native extension LibSQL Extension, so you can download and install them and configured in php.ini
but still, it's not based on PDO driver.
Make sure you follow the latest update from My X Thread!
Illuminate\Support\Facades\DB
to interact with LibSQL native driver.
Illuminate\Support\Facades\DB
for LibSQL Local Connection:
- Migration and Seeding
- CRUD
- Transaction
sync
operations using traditional Illuminate\Support\Facades\DB
for LibSQL Remote Replica Connection:
- Migration and Seeding
- CRUD
- Transaction
- Sync
Here the screenshot of fresh Laravel app database migration and data:
1. **Local `database.sqlite` tables**
![Local `database.sqlite` tables](https://github.com/laravel/framework/assets/32319439/2836c371-7e99-47a6-9e62-f496a236dad9)
2. **Remote database tables at Turso Dashboard**
![Remote database tables at Turso Dashboard](https://github.com/laravel/framework/assets/32319439/3869bac5-8351-4f52-accb-172a00e09fdf)
3. **Users Data from Seeder Database at Turso Dashboard**
![Users Data from Seeder Database at Turso Dashboard](https://github.com/laravel/framework/assets/32319439/0976c9d6-1dea-4fe0-a5ae-cf697f278ae2)
5. **Users Data From in Local `database.sqlite` File**
![Users Data From in Local `database.sqlite` File](https://github.com/laravel/framework/assets/32319439/14aef558-beb0-4ecb-bcea-a9ace529ed62)
LibSQL Drive Laravel - Out Now!!!
Tweet: https://x.com/panggilmeiam/status/1793857451969896480
Let's add support for PHP.