Download the PHP package catlabinteractive/central-storage-client without Composer
On this page you can find all versions of the php package catlabinteractive/central-storage-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download catlabinteractive/central-storage-client
More information about catlabinteractive/central-storage-client
Files in catlabinteractive/central-storage-client
Package central-storage-client
Short Description Client for CatLab central storage.
License MIT
Informations about the package central-storage-client
Central Storage Laravel Client
Central Storage is a storage engine built in Laravel. It includes duplicate upload detection, supports on the fly image (but cached) image resize and allows you to set 'Processors' that handle more complex file transformations like video transcoding etc.
Setup
Please follow the setup instructions described in the central storage project page to setup to storage system. Once that has been setup, you can include this library in your project to start storing assets.
Setting up your client project (in Laravel)
Central Storage provides a standard REST API and is thus consumable by any language or framework. We will focus on the existing Laravel client here. Note that it is a trivial task to implement a new client, as there is only a few methods to implement.
In your Laravel project, run
Then, wherever you want to upload a file, initialize the client:
Or, if you like, you can use the provider that uses the default configuration files:
The PHP client consumes Symfony's File objects. That means you can upload files straight from Laravel. The client returns
an Eloquent model 'Asset', which can be saved directly to a database (migration file is available in central-storage-client/database
).