Super Simple Shop for Laravel 5
20
1
2
Package Data
Maintainer Username: dan-powell
Maintainer Contact: dan@dan-powell.uk (Dan Powell)
Package Create Date: 2016-01-14
Package Last Update: 2017-01-19
Home Page:
Language: CSS
License: MIT
Last Refreshed: 2024-11-15 15:23:34
Package Statistics
Total Downloads: 20
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

WIP

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