0

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.

Marcin Nabiałek
  • 109,655
  • 42
  • 258
  • 291

1 Answers1

2

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

Community
  • 1
  • 1
Marcin Nabiałek
  • 109,655
  • 42
  • 258
  • 291