Download the PHP package jbernavaprah/eloquent-fs without Composer
On this page you can find all versions of the php package jbernavaprah/eloquent-fs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jbernavaprah/eloquent-fs
More information about jbernavaprah/eloquent-fs
Files in jbernavaprah/eloquent-fs
Package eloquent-fs
Short Description Eloquent FileSystem, inspired by Mongo GridFS
License MIT
Informations about the package eloquent-fs
EloquentFS
A laravel/lumen filesystem wrapper that use eloquent as datastore, inspired by GridFS (MongoDB)
Attention: it's not production ready!
Attention 2: It's under development!
Install:
Then create the required tables on database with:
This will use the standard laravel migrations, therefore will be also used the default connection set on your project.
Basic usage:
To use this wrapper, you need to prefix the paths with efs://
. The path will be used as id
of the file on database.
With eloquent model:
You can also use directly the Eloquent Model shipped with EloquentFS.
Deep configuration:
Different Connection:
If you would to change the connection then on your AppServiceProvider::register()
method add:
Disable Migrations:
If you would to disable the migrations, the on your AppServiceProvider::register()
method add:
Now you will be in charge to create and run the required migrations.
You can see those migrations on ./database/migrations
path.
How to help:
Do a PR, Do all tests and I will be glad to merge it!
Missing implementations:
- The locking file with
flock()
. - Need a performance review. A comparison with MongoDB will be super!
- Use in some production environments :D
- Need a testing review.
ftruncate()
need to be implemented.
All versions of eloquent-fs with dependencies
illuminate/database Version ^8.0
illuminate/pagination Version ^8.0
illuminate/filesystem Version ^8.0
illuminate/events Version ^8.0