- Clone this project into specific directory on your server, and go to this directory.
- Run
composer install
command from your terminal. - Configure your server for using api, according to the laravel docs.
- Copy
.env.example
file to.env
file and.env.testing
files. SetAPP_URL
param in these files. - Create databases:
- For common usage, and set
DB_DATABASE
param on.env
file - For testing, and set
DB_DATABASE
param on.env.testing
file - Set other params in both files:
DB_USERNAME
,DB_PASSWORD
- For common usage, and set
- run
php artisan key:generate
- run
php artisan migrate:fresh --seed
command to create tables and set default user.
For using first task, just run command from your terminal:
php check:string some-string
.
Before using api requests, take out the api key(api_token) from table users
of your database.
You can also take it from DatabaseSeeder
class(api_token). You should add this key to any request you would like to perform(api_token=needed_token
).
url | method | description |
---|---|---|
/api/image/store-files | POST | storing array of files |
/api/image/store-from-remote-source | POST | storing from remote source(only one file) |
/api/image/store-from-base64 | POST | from base 64 |
/api/image/create-resize | POST | creates resize on filesystem and updates table |
/api/image/resizes | GET | getting list of created resizes for specific image |
/api/image/resize | DELETE | deleting specific resize |
/api/image/all-resizes | DELETE | deleting all resizes from specific image |
Just run all tests from tests
directory.