inakianduaga / eloquent-external-storage Goto Github PK
View Code? Open in Web Editor NEWAdds external storage capabilities to a Laravel Eloquent model
License: MIT License
Adds external storage capabilities to a Laravel Eloquent model
License: MIT License
Drivers should have API for configurable properties (basePath for file/AwsS3, S3 bucket/credentials for AwsS3, etc.
That way each model can configure the driver instance it uses in whatever way it wants. The alternative is to provide a config key on the model that is passed to the driver and the driver uses that for configuring itself
storageDriverConfigKey
property on the trait, that's the only property we will need to set on the model so the driver/adaptor can be integrated.$storageDriver = app(StorageDriver::class)->setConfigKey($this->storageDriverConfigKey);
Use this on the creating/deleting methods (remember to pass the variable to the lambda function)
$binaryPathDBField
from the trait to a config property, that way we use only a single key to reference to the config, and everything else is read from there.Need to add block about version, credentials go inside credentials block on the S3 factory builder
We forgot to commit the ./gulp
folder!
We need to be able to mock the package configuration
Tests seem to be coupled, in particular testModelUpdateWithContentChanges
fails if there is any previous call to the $this->createModel
test method.
testModelUpdateWithContentChanges
before testCreateWithContent
, now testCreateWithContent
fails, so we need to figure out what's remaining of the mock spies.Update: The test testCreateWithContent
fails if we run it twice (same test under a different name). So we need to fix that
Solution!
http://stackoverflow.com/questions/17428050/laravel-4-model-events-dont-work-with-phpunit?rq=1
If there is no previous IoC binding for the storage driver, the automatic injection will fail, so we need to make it conditional
Unit tests are failing when run against hhvm, hhvm-nightly with error
`
Integrate phpunit running through https://github.com/mikeerickson/gulp-phpunit (for easy notifications, code coverage, etc)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.