Super Simple Shop for Laravel 5

Installs: 20

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 0

Open Issues: 0

Language:CSS

dev-master 2017-01-19 22:48 UTC

This package is not auto-updated.

Last update: 2024-12-07 20:06:23 UTC


README

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

Install

$ composer require dan-powell/shop
  1. config/app.php

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

Aliases

'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)

\Krucas\Notification\Middleware\NotificationMiddleware::class,
  1. publish assets

    php artisan vendor:publish --tag='migrations'

    php artisan vendor:publish --tag='config'

    php artisan vendor:publish --provider='AlfredoRamos\ParsedownExtra\ParsedownExtraServiceProvider' --force

  2. migrations

    php artisan migrate

  3. Add user

    php artisan shop:adduser

Updating

  1. publish assets

    php artisan vendor:publish --tag='migrations' php artisan vendor:publish --tag='admin'

  2. migrations

    php artisan migrate

Seeding

  1. publish

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

  2. DatabaseSeeder.php

    $this->call('ShopSeeder');

  3. Seed

    composer dump-autoload php artisan db:seed

Testing

Publish those assets

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

config/database.php

'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

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

.env.testing

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

php artisan migrate --database=testing

Run

php ./vendor/bin/codecept run

Roadmap

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

TODO: Finish checkout process

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

TODO: Pagination