PHPackages                             rakshitbharat/laravel-storage-with-database - 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. rakshitbharat/laravel-storage-with-database

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

rakshitbharat/laravel-storage-with-database
===========================================

A Laravel package for storing and retrieving text-based data using a database.

1.1(1y ago)172001[1 PRs](https://github.com/rakshitbharat/laravel-storage-with-database/pulls)MITPHP

Since Jun 15Pushed 1y ago1 watchersCompare

[ Source](https://github.com/rakshitbharat/laravel-storage-with-database)[ Packagist](https://packagist.org/packages/rakshitbharat/laravel-storage-with-database)[ RSS](/packages/rakshitbharat-laravel-storage-with-database/feed)WikiDiscussions main Synced today

READMEChangelog (2)DependenciesVersions (4)Used By (0)

Laravel Storage with Database
=============================

[](#laravel-storage-with-database)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a486dc75293fc89e27745dca7a195fa62ba6cfd713accf08bfc9a81328c208ff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72616b736869746268617261742f6c61726176656c2d73746f726167652d776974682d64617461626173652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rakshitbharat/laravel-storage-with-database)[![Total Downloads](https://camo.githubusercontent.com/e80b1d6d75ca40fbb3f08523754b81dd2324d40e34555d3bd63cd56e85bf77c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72616b736869746268617261742f6c61726176656c2d73746f726167652d776974682d64617461626173652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rakshitbharat/laravel-storage-with-database)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

Laravel Storage with Database is a powerful package that provides a seamless way to store and retrieve text-based data using a database in Laravel. It offers a simple and intuitive API similar to Laravel's built-in Storage facade, making it easy to switch from file-based storage to database storage for your text-based data\[1\].

Features
--------

[](#features)

- Store and retrieve text-based data using a database
- Seamless integration with Laravel's Storage facade
- Simple and intuitive API for interacting with stored data
- Supports various database drivers (MySQL, PostgreSQL, SQLite, etc.)
- Customizable database table and column names
- Provides mock implementations for file-related functions
- Comprehensive documentation and code examples

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require rakshitbharat/laravel-storage-with-database
```

After installing the package, you need to publish the configuration file:

```
php artisan vendor:publish --provider="Rakshitbharat\LaravelStorageWithDatabase\StorageDatabaseServiceProvider" --tag="config"
```

This will create a `storage-database.php` configuration file in your `config` directory. You can modify this file to customize the database connection, table name, and column names.

Next, run the database migration to create the necessary table:

```
php artisan migrate
```

Configuration
-------------

[](#configuration)

To use the database storage driver, you need to update your `config/filesystems.php` file. Add the following to the `disks` array:

```
'disks' => [
    // ... other disks ...
    'database' => [
        'driver' => 'database'
    ],
],
```

Usage
-----

[](#usage)

Once the package is installed and configured, you can start using it to store and retrieve text-based data. You can use the `Storage` facade with the `database` disk to interact with the stored data.

### Storing Data

[](#storing-data)

To store data, you can use the `put` method:

```
use Illuminate\Support\Facades\Storage;

Storage::disk('database')->put('key', 'value');
```

### Retrieving Data

[](#retrieving-data)

To retrieve data, you can use the `get` method:

```
use Illuminate\Support\Facades\Storage;

$value = Storage::disk('database')->get('key');
```

### Checking Data Existence

[](#checking-data-existence)

To check if a key exists, you can use the `exists` method:

```
use Illuminate\Support\Facades\Storage;

$exists = Storage::disk('database')->exists('key');
```

### Deleting Data

[](#deleting-data)

To delete data, you can use the `delete` method:

```
use Illuminate\Support\Facades\Storage;

Storage::disk('database')->delete('key');
```

### Other Methods

[](#other-methods)

The package supports other Laravel Storage methods like `append`, `prepend`, `copy`, `move`, `size`, `lastModified`, and more. Refer to the Laravel filesystem documentation for a complete list of available methods\[1\].

Contributing
------------

[](#contributing)

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the [GitHub repository](https://github.com/rakshitbharat/laravel-storage-with-database).

License
-------

[](#license)

Laravel Storage with Database is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT)\[1\].

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance45

Moderate activity, may be stable

Popularity19

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~321 days

Total

2

Last Release

426d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/17176729?v=4)[GitHub ](/maintainers/rakshitbharat)[@rakshitbharat](https://github.com/rakshitbharat)

---

Top Contributors

[![rakshitbharat](https://avatars.githubusercontent.com/u/17176729?v=4)](https://github.com/rakshitbharat "rakshitbharat (11 commits)")

---

Tags

databaselaravelstorage

### Embed Badge

![Health badge](/badges/rakshitbharat-laravel-storage-with-database/health.svg)

```
[![Health](https://phpackages.com/badges/rakshitbharat-laravel-storage-with-database/health.svg)](https://phpackages.com/packages/rakshitbharat-laravel-storage-with-database)
```

###  Alternatives

[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k117.2M118](/packages/jdorn-sql-formatter)[propel/propel1

Propel is an open-source Object-Relational Mapping (ORM) for PHP5.

8351.6M87](/packages/propel-propel1)[jfelder/oracledb

Oracle DB driver for Laravel

11518.4k](/packages/jfelder-oracledb)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
