• About
  • Privacy Policy
  • Disclaimer
  • Contact
Soft Bliss Academy
No Result
View All Result
  • Home
  • Artificial Intelligence
  • Software Development
  • Machine Learning
  • Research & Academia
  • Startups
  • Home
  • Artificial Intelligence
  • Software Development
  • Machine Learning
  • Research & Academia
  • Startups
Soft Bliss Academy
No Result
View All Result
Home Software Development

HOW TO INSTALL AND USE LARAVEL WITH SQLITE DATABASE ON YOUR WINDOWS PC

softbliss by softbliss
June 10, 2025
in Software Development
0
HOW TO INSTALL AND USE LARAVEL WITH SQLITE DATABASE ON YOUR WINDOWS PC
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter


HOW TO INSTALL AND USE LARAVEL WITH SQLITE DATABASE ON YOUR WINDOWS PC

In the web development world, several web application frameworks are required in the development of a website, that is, the backend aspect, some of which include – Angular, Django, React, Vue.js, Laravel, Expressjs, and many others. 

However, these web development frameworks require a tool to store, manage, and manipulate databases that are imputed into the website. These operations are not visible to end users but to the developers, which is why they are referred to as the backend/UX of the website. Examples of web development databases include MongoDB, Redis, Microsoft SQL Server, SQLite, etc. However, this article will focus on the installation of Laravel with SQLite. 

Laravel, which is the focus of this article, is a web application framework with expressive, elegant syntax. Laravel is also used to build robust, full-stack applications in PHP. It was developed by Taylor Otwell in 2011. SQLite is a lightweight, open-source, Relational Database Management System (RDBMS) that is used to store data in a single file on a hard drive. It also allows users to interact with a database by storing structured data like numbers or text in a file.

 One key reason why SQLite as a relational database management system is used alongside Laravel is its simplicity, fast configuration, and lack of server setup. SQLite offers developers a reliable solution for building efficient applications.

 

What, then, are the steps to installing PHP and Composer on your PC as they are prerequisites?

  1. Install PHP. You can use XAMPP, a free and open-source web server solution package. 
  2. Download the latest version of Composer from the Composer website. 
  3. Run the Composer installer: 
  4. Double-click the downloaded Composer-Setup.exe file 
  5. Follow the installation wizard 
  6. Choose the installation location and other preferences 
  7. Select Install 

Then verify the installation: 

  1. Open Command Prompt or PowerShell 
  2. Type composer -version 

The Composer version number should be printed on the console 

The latest version of Composer requires PHP 7.2.5 to run. 

Once this condition is met, Composer will need to manage dependencies. This is done by; 

  1. Package installation: Composer can install Laravel and its core components, as well as other packages and extensions. 
  2. Autoloading: Composer generates an autoloader for the project, which makes it easier to load classes. 
  3. Version control: Developers can specify version constraints for packages in the project’s composer.json file. 
  4. Package updates: Composers can easily update packages to their latest compatible versions. 
  5. Project configuration: Developers can use composer.json to define project-specific settings, such as the project name, description, authors, and licenses. 
  6. Script execution: Developers can define custom scripts in the composer.json file to automate tasks like migrations, cache clearing, and custom command executions. 

Once Composer downloads the dependencies’ files, it places them in the vendor directory in the project. The vendor directory is the standard location for all third-party code in a project.

To install Laravel using Composer, note that Composer Global requires “Laravel/installer”

composer create-project laravel/laravel (after running this command, a folder having the name Laravel will be created there)

Now go inside the Laravel folder and run the php artisan serve command.

 

Installing SQLite on Windows

Step 1: Download SQLite: Visit the official SQLite website and download the Windows binaries.

How to extract and place SQLite in a preferred directory:

First, open the SQLite database file with the sqlite3 command:

sqlite DATABASE_FILE.sqlite. Next, set the output so that command results are sent to a file instead of displayed:

.output schema.sql. Finally, output the schema by typing:

.schema. …

.output.

Step 2: Adding SQLite to the System Path

Explanation of setting up the environment variable to access SQLite from the command line;

  1. To set up the environment variable to access SQLite from the command line, you can add the SQLite directory to your system’s PATH environment variable:
  2. Unzip the downloaded SQLite file into a directory, such as C:\sqlite
  3. Right-click on the This PC or My Computer icon on your desktop
  4. Select Properties
  5. Click Advanced System Settings
  6. Click Environment Variables
  7. Under System Variables, find the Path variable and click Edit
  8. Add the C:\sqlite directory to the list of paths separated by a semicolon 

Checking if SQLite is installed properly by running sqlite3 in the command prompt.

 Setting Up Laravel Project

Step 1: Creating a New Laravel Project

Using Composer to create a new Laravel project:
bash
composer create-project –prefer-dist laravel/laravel sqlite-laravel-app

Step 2: Navigate to Project Directory

Open the project directory and ensure everything is set up.

Configuring Laravel to Use SQLite

Step 1: Setting up the .env File

Modify the .env file to configure the database connection:
bash.
DB_CONNECTION=sqlite

DB_DATABASE=/full/path/to/database/database.sqlite

Mention creating a database.sqlite file inside the database folder of your Laravel project.

Step 2: Creating the SQLite Database File

Use the command to create the SQLite database:
bash
touch database/database.sqlite

Explanation on how to check the connection in Laravel’s config/database.php.

Running Laravel Migrations

Step 1: Migrating Database Tables

Run the migration command to create default Laravel tables in SQLite:
bash
php artisan migrate

Step 2: Checking Tables in SQLite

Use an SQLite browser (like DB Browser for SQLite) to inspect tables and verify migration success.

Testing Laravel Application with SQLite

Step 1: Running Laravel Development Server

Start the Laravel server and access the application on the local host:
bash
Copy code
php artisan serve

Step 2: Testing CRUD Operations

Test database operations (like creating, reading, updating, and deleting) to ensure SQLite is working seamlessly with Laravel.

The summary of the process to install SQLite in Laravel includes;

  • Install PHP and Composer on Windows
  • Download SQLite
  • Adding SQLite to System Path
  • Setting Up Laravel Project
  • Configuring Laravel to Use SQLite
  • Running Laravel Migrations
  • Testing Laravel Application with SQLite

In conclusion, Integrating SQLite with Laravel offers developers a strong set of tools for building web applications. SQLite’s straightforward nature, paired with Laravel’s seamless compatibility, makes for an efficient development process. Whether for small projects or larger ones, this combination allows developers to take advantage of easy setup and the capabilities of Eloquent, maximizing the potential of this powerful pairing in web development. 

As reiterated in previous articles, the importance of community must be considered, especially in the tech space. Every expert programmer you admire started by learning to build simple programs. Here at Teners.net, we connect people who are interested in learning programming from scratch, ensuring that personalized tutorship is our priority. If you want to know more, reach out to us and other enthusiastic programmers who are learning in our academy at Teners.net.

 

 

 

 


Tags: DATABASEINSTALLLaravelSQLITEWindows
Previous Post

Hustle – by Adam Forbes

Next Post

Getting Math Students to Show Their Reasoning

softbliss

softbliss

Related Posts

Software Development

AutoGrow Textareas with CSS

by softbliss
June 12, 2025
Growing the Development Forest 🌲 — with Martin Fowler
Software Development

Growing the Development Forest 🌲 — with Martin Fowler

by softbliss
June 11, 2025
Customized Salesforce CRM Solutions for B2B Success
Software Development

Customized Salesforce CRM Solutions for B2B Success

by softbliss
June 11, 2025
How Dubai is Revolutionizing the Car Wash Business in UAE?
Software Development

How Dubai is Revolutionizing the Car Wash Business in UAE?

by softbliss
June 10, 2025
Adding support for Google Pay within Android WebView
Software Development

Adding support for Google Pay within Android WebView

by softbliss
June 9, 2025
Next Post
Getting Math Students to Show Their Reasoning

Getting Math Students to Show Their Reasoning

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Premium Content

Why K-12 educators must prioritize data literacy

Why K-12 educators must prioritize data literacy

April 23, 2025
Female-founded British startup Atomik AM raises €713k to scale its advance manufacturing business

Female-founded British startup Atomik AM raises €713k to scale its advance manufacturing business

May 23, 2025
Newsletters Are Dead. These Simple Emails Make Me $10,000/Month | by Matt Giaro | The Startup | Apr, 2025

Newsletters Are Dead. These Simple Emails Make Me $10,000/Month | by Matt Giaro | The Startup | Apr, 2025

April 18, 2025

Browse by Category

  • Artificial Intelligence
  • Machine Learning
  • Research & Academia
  • Software Development
  • Startups

Browse by Tags

Amazon App Apps Artificial Blog Build Building Business Coding Data Development Digital Framework Future Gemini Generative Google Guide Innovation Intelligence Key Language Large Learning LLM LLMs Machine Microsoft MIT model Models News NVIDIA opinion OReilly Research Science Series Solutions Startup Startups students Tech Tools Video

Soft Bliss Academy

Welcome to SoftBliss Academy, your go-to source for the latest news, insights, and resources on Artificial Intelligence (AI), Software Development, Machine Learning, Startups, and Research & Academia. We are passionate about exploring the ever-evolving world of technology and providing valuable content for developers, AI enthusiasts, entrepreneurs, and anyone interested in the future of innovation.

Categories

  • Artificial Intelligence
  • Machine Learning
  • Research & Academia
  • Software Development
  • Startups

Recent Posts

  • How Unfiltered AI Video Tools Are Redefining Accessibility
  • Google for Nonprofits to expand to 100+ new countries and launch 10+ new no-cost AI features
  • 5 strategies to refine recruitment and help solve the teacher shortage

© 2025 https://softblissacademy.online/- All Rights Reserved

No Result
View All Result
  • Home
  • Artificial Intelligence
  • Software Development
  • Machine Learning
  • Research & Academia
  • Startups

© 2025 https://softblissacademy.online/- All Rights Reserved

Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?