Get Laravel 5.8.x database for your non laravel projects. Built on top of illuminate/database to provide migration, seeding and artisan support

Installs: 20 531

Dependents: 1

Suggesters: 0

Stars: 40

Watchers: 4

Forks: 11

Open Issues: 0


5.8.21 2019-06-12 01:43 UTC


Provides full laravel database functionality for your non laravel projects adds Migration, Seeding and Artisan support to Illuminate Database.

Laravel is a web application framework with expressive, elegant syntax. We extracted the database functionality from it and made it available for other frameworks

The Illuminate Database component is a full database toolkit for PHP, providing an expressive query builder, ActiveRecord style ORM, and schema builder. It currently supports MySQL, Postgres, SQL Server, and SQLite. We combined it with Illuminate FileSystem and Illuminate Console to make Artisan work with database related commands.


Install Composer

Laravel Database utilizes Composer to manage its dependencies. First, download a copy of the composer.phar. Once you have the PHAR archive, you can either keep it in your local project directory or move to usr/local/bin to use it globally on your system. On Windows, you can use the Composer Windows installer.

Install Laravel Database

Install Laravel Database by issuing the Composer create-project command in your terminal:

composer create-project laravel/database --prefer-dist

Usage Instructions

From your public index.php include the autoload.php in bootstrap folder this internally uses composer autoloader. This enables lazy loading of all db related classes. Only when you call one of the DB related class, database engine is initialized.

Even when using version 5.8.* the folder structure will be the same as 4.2.*

Adding More Components

For instructions on how to add more laravel components or compatible third party service providers etc., read the comments in app/config/app.php file

Official Documentation

Documentation for the entire framework can be found on the Laravel website. Refer to all database related sections from there.

Note:- For folder structure refer to version 4.2 of the documentation, for everything else refer to the version corresponding to the version you use here


All the credits for the Laravel Database goes to the Laravel Framework developers. We are only putting the pieces together here


Issues and pull requests relating to this integration should be filed on the laravel/database repository.


The Laravel Database is open-sourced software licensed under the MIT license