php - How to create sqlite file in Laravel 5.2 framework? -


i want create sqlite file manually whenever user registered. use

new sqlite3($file_path) 

but laravel keep tell me

class 'app\http\controllers\sqlite3' not found 

please me this. thank very help.

you should use:

new \sqlite3($file_path) 

or put

use sqllite3; 

below

namespace app\http\controllers; 

now trying use sqlite3 current namespace.

you might interested in looking @ how use objects other namespaces , how import namespaces in php


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -