PHPackages                             spam-n-eggs/laravel-mysqlite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. spam-n-eggs/laravel-mysqlite

ActiveLibrary[Database &amp; ORM](/categories/database)

spam-n-eggs/laravel-mysqlite
============================

MySQLite is a Laravel connector for SQLite that emulates MySQL functionality. The currently ported functionalities can be viewed in README.md on the github site.

2.0.2(1mo ago)76.9k6[8 issues](https://github.com/dominion-solutions/laravel-mysqlite/issues)[6 PRs](https://github.com/dominion-solutions/laravel-mysqlite/pulls)MITPHPPHP &gt;=8.2

Since Jan 25Pushed 3y ago2 watchersCompare

[ Source](https://github.com/dominion-solutions/laravel-mysqlite)[ Packagist](https://packagist.org/packages/spam-n-eggs/laravel-mysqlite)[ Fund](https://paypal.me/DominionSolutionsLLC)[ GitHub Sponsors](https://github.com/spam-n-eggs)[ RSS](/packages/spam-n-eggs-laravel-mysqlite/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (30)Versions (24)Used By (0)

laravel-mysqlite
================

[](#laravel-mysqlite)

[![CI](https://camo.githubusercontent.com/589016efe517da403021aa46573079fe12d6a114708d9979b38b57bf997e6e8d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7370616d2d6e2d656767732f6c61726176656c2d6d7973716c6974652f63692e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265266c6162656c3d4349)](https://github.com/spam-n-eggs/laravel-mysqlite/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/710bfd45d6a002a035a31fb84c8c9b2d24658869d886f0d048fb44a0f4709c5b/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f7370616d2d6e2d656767732f6c61726176656c2d6d7973716c6974653f7374796c653d666c61742d737175617265266c6162656c3d636f766572616765)](https://codecov.io/gh/spam-n-eggs/laravel-mysqlite)[![StyleCI](https://camo.githubusercontent.com/397be2e626de3af7ec9dfacb6bb26f50be7bd269ffcb149e6c185c1102b9997d/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3136373036393236392f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/167069269)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/fd4d2ad3b0475937419b8ac899d01ba6525c6f3a09e2a2976acfedf86a16cc0f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7370616d2d6e2d656767732f6c61726176656c2d6d7973716c6974652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/spam-n-eggs/laravel-mysqlite/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/081cd3843ce18f6b38a2bc320d44041f57dd4e72ab25ff31055c7d46175dcd81/68747470733a2f2f706f7365722e707567782e6f72672f7370616d2d6e2d656767732f6c61726176656c2d6d7973716c6974652f762f737461626c65)](https://packagist.org/packages/spam-n-eggs/laravel-mysqlite)[![Total Downloads](https://camo.githubusercontent.com/d8be76e34e7f2539ceb9420e6452524b06890984ffa65072b76e61eed151992e/68747470733a2f2f706f7365722e707567782e6f72672f7370616d2d6e2d656767732f6c61726176656c2d6d7973716c6974652f646f776e6c6f616473)](https://packagist.org/packages/spam-n-eggs/laravel-mysqlite)[![License](https://camo.githubusercontent.com/8eb1b618cffaf9fadca523041749fe8992ee94252795da4bcf520f5012da733e/68747470733a2f2f706f7365722e707567782e6f72672f7370616d2d6e2d656767732f6c61726176656c2d6d7973716c6974652f6c6963656e7365)](https://packagist.org/packages/spam-n-eggs/laravel-mysqlite)[![Dependabot](https://camo.githubusercontent.com/f75086228cd2394f0ed6e945ec38eea49deb5a8518226de88d487f43915fac57/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446570656e6461626f742d656e61626c65642d627269676874677265656e3f7374796c653d666c61742d737175617265266c6f676f3d646570656e6461626f74)](https://github.com/spam-n-eggs/laravel-mysqlite/network/updates)

Laravel MySQLite is meant to be used in conjunction with Laravel. It is a database connection that adds select functions from MySQL to SQLite.

Requirements
============

[](#requirements)

- **PHP**: &gt;= 8.2
- **Laravel**: 12.x or 13.x (`illuminate/database ^12.0 || ^13.0`)

For users upgrading from v1.x, see [UPGRADING.md](UPGRADING.md) for migration instructions.

Usage
=====

[](#usage)

Adding the Composer Resource
----------------------------

[](#adding-the-composer-resource)

1. Execute `composer require spam-n-eggs/laravel-mysqlite` or alternatively `composer require --dev spam-n-eggs/laravel-mysqlite`

Registering as a Service Provider
---------------------------------

[](#registering-as-a-service-provider)

In order to reduce clutter it is preferable to create a separate Service Provider

1. If there is a need to conditionally register the Service (i.e. you only use it in testing) create a new class in `app/Providers` that extends `Mhorninger\SQLite\MySQLiteServiceProvider`

    ```
