![]() ![]() If you like my post, show me love by recommending my post. ![]() I hope this tutorial helped you benefit from my experience! This means that you can access objects in your SQLite database the same way you would use phpMyAdmin for MySQL. Note: When checking your database, using the inbuilt PHPStorm database feature will save you a lot of stress. Then go to 127.0.0.1:3000/register on your browser and try to register. To test if your configuration works, run this command to set up Laravel Authentication scaffoldings: php artisan make:auth Then, you can view your project from this URL 127.0.0.1:3000 or any domain specified by you. Launch your Laravel project from your terminal with this command: php artisan serve - host=”127.0.0.1" - port=3000 –env=”development” You can run your migrations now, but first, run this command in your terminal: php artisan migrate:install - env=localīefore you migrate your tables to the database with this command: php artisan migrate - env=local Then, restart the server with this command: sudo service apache2 restart Stop your Apache server with this command in your terminal: sudo service apache2 stop SETUP SQLITE BROWSER UBUNTU INSTALLIf you are using PHP 7, run this code in your terminal: sudo apt-get install php7.0-sqlite3įor PHP 5 versions, you run this code in your terminal Step 5 SETUP SQLITE BROWSER UBUNTU DRIVERYou should install the driver that allows you to use PHP with SQLite. Note: You don’t need to change the value of DB_USERNAME and DB_PASSWORD Step 4 Another thing you have to do is change DB_DATABASE to the path of your database.sqlite on your local computer. env file and and change your DB_CONNECTION to SQLite. Open your database.php file in the config folder of your project and make sure what you see in the image below is the same in your project. SQLite should be installed on your PC - follow this Tutorialpoint link)Ĭreate a database.sqlite file in the database folder of your Laravel project. So, I have decided to write this short tutorial. As I started to configure my Laravel project to work with SQLite, I found out that setting up SQLite to work with Laravel is not as easy as that. SQLite came to my mind first because I have used it for Android development. So, I decided to explore another database system with PHP for the first time, and I saw that Laravel supported SQL Server, MySQL, SQL server, and PostgreSQL. I had to keep switching between Ubuntu and Windows to work on any of my PHP projects, and it was tiring and stressful. I was having a lot of issues with my MySQL configuration on my Ubuntu OS, even after going through all the related questions on Stack Overflow and asking my own. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |