2017 © Pedro Peláez
 

library shop

Super Simple Shop for Laravel 5

image

dan-powell/shop

Super Simple Shop for Laravel 5

  • Thursday, January 19, 2017
  • by dan-powell
  • Repository
  • 1 Watchers
  • 1 Stars
  • 14 Installations
  • CSS
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

WIP

This software is pre-alpha, don't bother to use it just yet..., (*1)

Install

1., (*2)

$ composer require dan-powell/shop
  1. config/app.php, (*3)

    DanPowell\Shop\ShopServiceProvider::class, AlfredoRamos\ParsedownExtra\ParsedownExtraServiceProvider::class, Baum\Providers\BaumServiceProvider::class, Ignited\LaravelOmnipay\LaravelOmnipayServiceProvider::class Krucas\Notification\NotificationServiceProvider::class,, (*4)

Aliases, (*5)

'Str' => Illuminate\Support\Str::class,
'Markdown'  => AlfredoRamos\ParsedownExtra\Facades\ParsedownExtra::class,
'Omnipay' => Ignited\LaravelOmnipay\Facades\OmnipayFacade::class
'Notification' => Krucas\Notification\Facades\Notification::class,

Kernel middleware array (must be placed after 'Illuminate\Session\Middleware\StartSession' middleware), (*6)

\Krucas\Notification\Middleware\NotificationMiddleware::class,
  1. publish assets, (*7)

    php artisan vendor:publish --tag='migrations', (*8)

    php artisan vendor:publish --tag='config', (*9)

    php artisan vendor:publish --provider='AlfredoRamos\ParsedownExtra\ParsedownExtraServiceProvider' --force, (*10)

  2. migrations, (*11)

    php artisan migrate, (*12)

  3. Add user, (*13)

    php artisan shop:adduser , (*14)

Updating

  1. publish assets, (*15)

    php artisan vendor:publish --tag='migrations' php artisan vendor:publish --tag='admin', (*16)

  2. migrations, (*17)

    php artisan migrate, (*18)

Seeding

  1. publish, (*19)

    php artisan vendor:publish --tag='dev' --force, (*20)

  2. DatabaseSeeder.php, (*21)

    $this->call('ShopSeeder');, (*22)

  3. Seed, (*23)

    composer dump-autoload php artisan db:seed, (*24)

Testing

Publish those assets, (*25)

php artisan vendor:publish --tag='tests' --force

config/database.php, (*26)

'testing' => [
    'driver'    => 'mysql',
    'host'      => 'localhost',
    'database'  => 'shop_testing',
    'username'  => 'homestead',
    'password'  => 'secret',
    'charset'   => 'utf8',
    'collation' => 'utf8_unicode_ci',
    'prefix'    => '',
    'strict'    => false,
],

test/functional.suite.yml, (*27)

modules:
  enabled:
    - Laravel5:
        environment_file: .env.testing

.env.testing, (*28)

APP_ENV=testing
APP_DEBUG=true
APP_KEY=AqBqHv6GYO2PSIY3PIVO3o4zdcKovDdN

BASE_URL=http://shop.dev

DB_HOST=localhost
DB_DATABASE=shop_testing
DB_USERNAME=homestead
DB_PASSWORD=secret

CACHE_DRIVER=file
SESSION_DRIVER=file

Migrate, (*29)

php artisan migrate --database=testing

Run, (*30)

php ./vendor/bin/codecept run

Roadmap

TODO: Replace hard-coded strings with language file (including validation messages), (*31)

TODO: Finish checkout process, (*32)

TODO: Add callback (send order ID as encrypted string), (*33)

TODO: Pagination, (*34)

The Versions