2017 © Pedro PelĂĄez
 

library unisys-api

Unisys basic API skeleton.

image

weareunite/unisys-api

Unisys basic API skeleton.

  • Friday, July 27, 2018
  • by vlado.zilka
  • Repository
  • 1 Watchers
  • 0 Stars
  • 42 Installations
  • PHP
  • 4 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 25 Versions
  • 0 % Grown

The README.md

unisys-api

Unisys basic API skeleton developed by Unite., (*1)

Requirements

Unisys API skeleton requires: - PHP 7.1+ - Database that supports json fields such as MySQL 5.7 or higher., (*2)

It uses Laravel 5.6, so it has to meet also all its requirements https://laravel.com/docs/5.6/installation#server-requirements., (*3)

Installation

New UniSys project

For clean API skeleton based on Laravel 5.6, you can use weareunite/unisys-installer that do all the boring work for you. Let's install it globally:, (*4)

composer global require "weareunite/unisys-installer"

Now you can create a new Unisys skeleton:, (*5)

unisys new project_name

This is going to install all dependencies, publish all important vendor configs, migrate, setup some configs and run migrations., (*6)

Command is going to generate and print the password for the default administrator account. Do not forget to remember this password, (*7)

Add Unisys to existing project

Or alternatively, you can use your existing Laravel 5.6 application. Start with requiring these two main packages:, (*8)

composer require weareunite/unisys-api

To install this package use:, (*9)

php artisan unisys-api:init-env

and after:, (*10)

php artisan unisys-api:install

This is going to install all dependencies, publish all important vendor configs, migrate, setup some configs, webpack config and run migrations., (*11)

Command is going to generate and print the password for the default administrator account. Save this password to your clipboard, we are going to need it soon., (*12)

Requirements

Add your DSN to .env:, (*13)

SENTRY_LARAVEL_DSN=https://public:secret@sentry.example.com/1

Optimization tools

Medialibrary will use these tools to optimize converted images if they are present on your system:, (*14)

Here's how to install all the optimizers on Ubuntu:, (*15)

sudo apt-get install jpegoptim
sudo apt-get install optipng
sudo apt-get install pngquant
sudo npm install -g svgo
sudo apt-get install gifsicle

And here's how to install the binaries on MacOS (using Homebrew):, (*16)

brew install jpegoptim
brew install optipng
brew install pngquant
brew install svgo
brew install gifsicle

To create derived images GD should be installed on your server. For the creation of thumbnails of svg's or pdf's you should also install Imagick., (*17)

Wkhtmltopdf Installation

Choose one of the following options to install wkhtmltopdf/wkhtmltoimage., (*18)

  1. Download wkhtmltopdf from here;
  2. Or install as a composer dependency. See wkhtmltopdf binary as composer dependencies for more information.

Testing

  1. Copy .env.example to .env and fill in your database credentials.
  2. Run vendor/bin/phpunit.

License

The MIT License (MIT). Please see License File for more information., (*19)

The Versions