spatie / laravel-translatable

Making Eloquent models translatable

Home Page:https://spatie.be/docs/laravel-translatable

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Testing via sqlite fail because of json_extract() function

opened this issue · comments

Sorry for all this, but...

I'm using sqlite to test a method about user registration whereby I use getTranslation() method:

$service->getTranslation('name', 'en')

And I'm receiving the error in the title:

PDOException {#1747
          #message: "SQLSTATE[HY000]: General error: 1 no such function: json_extract"
          #code: "HY000"

I just want to know how are we suppose to test translatable attributes during sqlite tests!

You need to install the JSON1 extension of SQLite.

Thanks for the reply, I tried back then and failed doing so. -Guess the documents were not that user-friendly!