lmottasin / laravel-image-manipulation-rest-api

This is an image manipulation REST API written in PHP Laravel Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel Image Manipulation REST API

Demo

Here is fully working Demo: https://www.lobiimages.com/
You have to register first in order to generate access token and make API requests.

Test locally

Download postman_collection.json file, import it in your postman and test locally.

Prerequisites

PHP Extensions

php-mbstring php-dom php-intl php-curl php-mysql php-gd

Basic installation steps

Before you start the installation process you need to have installed composer

  1. Clone the project
  2. Navigate to the project root directory using command line
  3. Run composer install
  4. Copy .env.example into .env file
  5. Adjust DB_* parameters.
    If you want to use Mysql, make sure you have mysql server up and running.
    If you want to use sqlite:
    1. you can just delete all DB_* parameters except DB_CONNECTION and set its value to sqlite
    2. Then create file database/database.sqlite
  6. Run php artisan key:generate --ansi
  7. Run php artisan migrate

Installing locally for development

Run php artisan serve which will start the server at http://localhost:8000

Installing on production

  1. Create a virtual host file
  2. Enable it
  3. Reload apache

Virtual host template.

<VirtualHost *:80>
    ServerName yourproductiondomain.com
    ServerAlias www.yourproductiondomain.com
    DocumentRoot /project-installation-path/public

    <Directory "/project-installation-path/public`">
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog /path-to-logs-folder/error.log
    CustomLog /path-to-logs-folder/access.log combined
</VirtualHost>

If you installed the project using apache and have any issues regarding permissions when installing on production, do the following.

  1. Add the project owner user in www-data group
    sudo usermod -a -G www-data project-owner-user
  2. Change the owner of several folders into www-data user
    chown www-data:www-data storage/ -R
    chown www-data:www-data public/images

Contributing

Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the Laravel documentation.

Code of Conduct

In order to ensure that the Laravel community is welcoming to all, please review and abide by the Code of Conduct.

Security Vulnerabilities

If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via taylor@laravel.com. All security vulnerabilities will be promptly addressed.

License

The Laravel framework is open-sourced software licensed under the MIT license.

About

This is an image manipulation REST API written in PHP Laravel Framework


Languages

Language:PHP 72.8%Language:Blade 26.7%Language:Shell 0.5%