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.

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.