Level 70
sudo apt-get install php-sqlite3
I want to work with sqlite database while i'm on phpunit but laravel says driver not found:
Windows
php.ini:
extension=pdo_sqlite
phpunit.xml:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true">
<testsuites>
<testsuite name="Application Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./app</directory>
</include>
</coverage>
<php>
<env name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
</php>
</phpunit>
database.php
'sqlite' => [
'driver' => 'sqlite',
'database' => database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],
also file exists at C:\xampp\htdocs\project\database\database.sqlite
error:
could not find driver (SQL: PRAGMA foreign_keys = ON;)#0 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(638)
Please or to participate in this conversation.