You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Update:
Remove Model reference from the drivers (single-responsability, the driver shouldn't have to give a crap about what the model is).
Move the storage setPath update to the actual boot observer method.
Add abstract driver implementation
Extract the generateStoragePath method which is always the same
Add 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.
Add a setConfigKey() method to the driver interface (& abstract implementation)
On boot method of trait, add after parent::boot() a
Use this on the creating/deleting methods (remember to pass the variable to the lambda function)
Move the $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.
The text was updated successfully, but these errors were encountered:
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
Update:
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.$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.The text was updated successfully, but these errors were encountered: