Skip to content

aguaragazu/redminportal

 
 

Repository files navigation

alt text

RedminPortal by Redooor

A Laravel 5.1 package as a backend administrating tool for Content Management and Ecommerce sites. Gives you ability to add, edit and remove category, product, promotions and many more. Provides User Interface for administrating users and groups.

  • Looking for RedminPortal for Laravel 5.0? Visit the v0.2 Branch.
  • Looking for RedminPortal for Laravel 4.2? Visit the v0.1 Branch.

Table of Content

  1. Compatibility
  2. Models and Features
  3. Installation guide for Users
  4. Installation guide for Contributors
  5. Testing
  6. Versioning
  7. Contributing
  8. Creator
  9. License
  10. External Libraries Used
  11. Change log
  12. Upgrade Guide

#Compatibility

Laravel RedminPortal
4.2 0.1.x
5.0 0.2.x
5.1 0.3.x

Important note

Version 0.3.0 is backward compatible to Version 0.2.0. Version 0.2.0 is NOT backward compatible to Version 0.1.*.

  • Looking for RedminPortal for Laravel 5.0? Visit the v0.2 Branch.
  • Looking for RedminPortal for Laravel 4.2? Visit the v0.1 Branch.

Models and Features

User Management

  • User
  • Group
  • Mailinglist

Content Management

  • Announcement
  • Post
  • Portfolio
  • Promotion

Online Store (Physical Products)

  • Category
  • Coupon
  • Product
  • Order

Membership Subscription (Digital Products)

  • Category
  • Coupon
  • Media
  • Membership
  • Module
  • ModuleMediaMembership
  • Purchase

Morphs

  • Image
  • Tag

Downloadable Reports

  1. Downloadable CSV reports for Purchases and Mailinglist.

Translation options

There is an translation option in Category, Module, Media, Product, Promotion and Portfolio.

You can add more languages in the translation config file at path

vendor\redooor\redminportal\src\config\translation.php

or if you have published it to your root

root\config\packages\redooor\redminportal\translation.php

To use it, get the model's translations and use json_decode to convert content into an object, like this:

foreach ($product->translations as $translation) {
    $lang = $translation->lang;
    $translated = json_decode($translation->content);
    var_dump($translated->name, $translated->short_description, $translated->long_description);
}

Installation guide for Users

You can install Laravel version 5.1 using the command:

composer create-project laravel/laravel myproject 5.1.*
  1. Add Redminportal to composer.json of a new Laravel application, under "require". Like this:

     "require": {
         "laravel/framework": "5.1.*",
         "redooor/redminportal": "0.3.*"
     },
    

Due to the use of getID3 package, we need to set the minimum-stability to "dev" but prefer-stable to "true". Like this:

    "minimum-stability": "dev",
    "prefer-stable": true
  1. Then run php composer update in a terminal.

  2. Now, edit your [root]\config\app.php providers and alias array like this:

     'providers' => array(
         Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
         ... omitted ...
         
         // Add this line
         Redooor\Redminportal\RedminportalServiceProvider::class,
     ),
    
  3. Then run php composer dump-autoload in a terminal.

  4. Run the following commands in a terminal to perform database migration for Redminportal:

     ?> php artisan vendor:publish --provider="Redooor\Redminportal\RedminportalServiceProvider" --tag="migrations" --force
     ?> php artisan migrate --path=/database/migrations/vendor/redooor/redminportal
    

    NOTE: using --force will overwrite existing files

  5. Run the following in a terminal to seed the database with initial admin username and password:

     ?> php artisan db:seed --class="RedminSeeder"
     
     Username/password: admin@admin.com/admin
    
  6. Publish package assets by running this in a terminal:

     ?> php artisan vendor:publish --provider="Redooor\Redminportal\RedminportalServiceProvider" --tag="public" --force
    

    NOTE: using --force will overwrite existing files

  7. Publish package config by running this in a terminal:

     ?> php artisan vendor:publish --provider="Redooor\Redminportal\RedminportalServiceProvider" --tag="config" --force
    

    NOTE: using --force will overwrite existing files

Installation guide for Contributors

It is recommended that contributors use Laravel Homestead for development because it will provide the same development environment for all of us. Read more about Laravel Homestead here.

  1. Install Laravel 5.1 using this guide. We'll call this the [root].

You can install Laravel version 5.1 using the command:

composer create-project laravel/laravel myproject 5.1.*
  1. Create a folder named "packages" inside the [root] folder.

  2. Clone the Redooor\Redminportal repository into [root]\packages\redooor\redminportal folder.

  3. Open a terminal, cd to [root]\packages\redooor\redminportal folder then run:

    composer update --prefer-dist -vvv --profile

  4. Then add Redooor\Redminportal source to [root]'s composer.json under "autoload" like this:

     "autoload": {
         "classmap": [
             "database"
         ],
         "psr-4": {
             "App\\": "app/",
             "Redooor\\Redminportal\\": "packages/redooor/redminportal/src"
         }
     },
    
  5. Due to the use of getID3 package, we need to set the minimum-stability to "dev" but prefer-stable to "true". Like this:

     "minimum-stability": "dev",
     "prefer-stable": true
    
  6. Then cd to [root]'s folder and run:

    composer update --prefer-dist -vvv --profile --no-dev

    NOTE: the [root]'s phpunit dependency will clash with the package's phpunit. "--no-dev" ensures that it is not installed on [root]. You can also choose to remove phpunit from require inside the [root]'s composer.json.

  7. Now, edit your [root]\config\app.php providers and alias array like this:

     'providers' => array(
         Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
         ... omitted ...
         
         // Add this line
         Redooor\Redminportal\RedminportalServiceProvider::class,
     ),
    
  8. Run the following commands in a terminal to perform database migration for Redminportal inside the [root] folder:

     ?> php artisan vendor:publish --provider="Redooor\Redminportal\RedminportalServiceProvider" --tag="migrations" --force
     ?> php artisan migrate --path=/database/migrations/vendor/redooor/redminportal
    

    NOTE: using --force will overwrite existing files

  9. Run the following in a terminal to seed the database with initial admin username and password:

    ?> php artisan db:seed --class="RedminSeeder"
    
    Username/password: admin@admin.com/admin
    
  10. Publish package assets by running this in a terminal:

    ?> php artisan vendor:publish --provider="Redooor\Redminportal\RedminportalServiceProvider" --tag="public" --force
    

    NOTE: using --force will overwrite existing files

  11. Publish package config by running this in a terminal:

    ?> php artisan vendor:publish --provider="Redooor\Redminportal\RedminportalServiceProvider" --tag="config" --force
    

    NOTE: using --force will overwrite existing files

Install Grunt and Bower dependencies

  1. You need to have nodejs installed
  2. cd to workbench/redooor/redminportal
  3. Run npm install
  4. Run bower install
  5. To build all assets, run grunt
  6. To compile just the less css, run grunt less-compile

Testing

  • In packages\redooor\redminportal folder, run

      ?> composer update --prefer-dist -vvv --profile
      ?> vendor/bin/phpunit
    

    NOTE: If you run out of memory while running the full tests, try running the tests by sub-folders.

      ?> vendor/bin/phpunit tests/models/
      ?> vendor/bin/phpunit tests/controllers/
      ?> vendor/bin/phpunit tests/relationships/
    

Versioning

For transparency into our release cycle and in striving to maintain backward compatibility, Redooor RedminPortal will adhere to the Semantic Versioning guidelines whenever possible.

Contributing

Thank you for considering contributing to RedminPortal. Before any submission, please spend some time reading through the CONTRIBUTING.md document.

Creator

Andrews Ang

License

RedminPortal is open-sourced software licensed under the MIT license.

External Libraries Used

Change log

Refer to CHANGELOG.md

Upgrade Guide

Refer to UPGRADE.md

About

A Laravel package as a backend administrating tool for Content Management and Ecommerce sites.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 76.5%
  • CSS 14.6%
  • JavaScript 8.9%