dan-powell / shop
Laravel 5 的超级简单商店
Requires
- alfredo-ramos/parsedown-extra-laravel: ~0.3
- baum/baum: ~1.1
- edvinaskrucas/notification: 5.*
- fzaninotto/faker: ~1
- ignited/laravel-omnipay: 2.*
- laravel/framework: 5.1.*
- laravelcollective/html: 5.1.*
- omnipay/paypal: ~2.0
Requires (Dev)
This package is not auto-updated.
Last update: 2024-09-14 18:26:12 UTC
README
此软件处于预alpha阶段,请不要急于使用...
安装
$ composer require dan-powell/shop
-
config/app.php
DanPowell\Shop\ShopServiceProvider::class, AlfredoRamos\ParsedownExtra\ParsedownExtraServiceProvider::class, Baum\Providers\BaumServiceProvider::class, Ignited\LaravelOmnipay\LaravelOmnipayServiceProvider::class, Krucas\Notification\NotificationServiceProvider::class
别名
'Str' => Illuminate\Support\Str::class,
'Markdown' => AlfredoRamos\ParsedownExtra\Facades\ParsedownExtra::class,
'Omnipay' => Ignited\LaravelOmnipay\Facades\OmnipayFacade::class
'Notification' => Krucas\Notification\Facades\Notification::class,
Kernel 中间件数组(必须在 'Illuminate\Session\Middleware\StartSession' 中间件之后放置)
\Krucas\Notification\Middleware\NotificationMiddleware::class,
-
发布资产
php artisan vendor:publish --tag='migrations'
php artisan vendor:publish --tag='config'
php artisan vendor:publish --provider='AlfredoRamos\ParsedownExtra\ParsedownExtraServiceProvider' --force
-
迁移
php artisan migrate
-
添加用户
php artisan shop:adduser
更新中
-
发布资产
php artisan vendor:publish --tag='migrations' php artisan vendor:publish --tag='admin'
-
迁移
php artisan migrate
播种
-
发布
php artisan vendor:publish --tag='dev' --force
-
DatabaseSeeder.php
$this->call('ShopSeeder');
-
播种
composer dump-autoload php artisan db:seed
测试
发布这些资产
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
迁移
php artisan migrate --database=testing
运行
php ./vendor/bin/codecept run
路线图
TODO:将硬编码的字符串替换为语言文件(包括验证消息)
TODO:完成结账流程
TODO:添加回调(以加密字符串形式发送订单ID)
TODO:分页