marcohern/dimages

Upload images and download them in different densities and sizes

1.0.10 2018-06-21 18:46 UTC

README

Simple Image management for Laravel.

Installation fo Development Environment

To install dimages to develop for it, follow these steps.

  1. Install a new Laravel application that you will use for running and testing your development. Let's call it laravel_packages.
  2. In the root folder, create a packages/marcohern folder.
  3. In packages/marcohern folder, checkout dimages source in a dimages folder. In the end, the path to the cloned repository should be in: /path/to/your/workspace/laravel_packages/marcohern/dimages/

At this point, you must register the package in laravel:

  1. Add the DimagesServiceProvider to the providers list in the config/app.php file.
  'providers' => [
    ...
    
    /*
     * Package Service Providers...
     */
    Marcohern\Dimages\DimagesServiceProvider::class,
    
    ...
  ]    
  1. Include the package source files in the composer.json file autoload section. Include the dimages namespace/source folder in the psr-4 list, and the Helper.php in the files list.
{

  "autoload":{
  
    "psr-4": {
      "App\\": "app/",
      "Marcohern\\Dimages\\": "packages/marcohern/dimages/src"
    },
    "files": [
      "packages/marcohern/dimages/src/Helpers.php"
    ]
  }
  
}
  1. Finally, run composer dump-autoload.
.../laravel_packages>composer dump-autoload

At this point, the package module should be working. Test it by opening the module's main route.

  1. Run php artisan serve on the laravel project.
.../laravel_packages>php artisan serve
  1. Open a browser and access the package module with the following url: http://localhost:8000/mhn/dimages/index. This should open a simpel dashboard page. You are all set!