Reputation: 72
I want to create an Sqlite file manually whenever user registered. I use
new SQLite3($file_path)
But Laravel keep tell me
Class 'App\Http\Controllers\Sqlite3' not found
Please help me with this. Thank very very much for the help.
Upvotes: 0
Views: 216
Reputation: 111839
You should use:
new \SQLite3($file_path)
or put
use SqlLite3;
below
namespace App\Http\Controllers;
Now you are trying to use SqLite3
from current namespace.
You might be also interested in looking at How to use objects from other namespaces and how to import namespaces in PHP
Upvotes: 2