定制 spatie/checkout 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

spatie/checkout

Composer 安装命令:

composer require spatie/checkout

包简介

A simple e-commerce checkout helper for Laravel 5

README 文档

README

Build Status Latest Stable Version License

When building a checkout process for a webshop, you likely discovery a need to store the id of a newly created order in a session. This Laravel package provides a clean way to work the order id in the session.

Support us

Learn how to create a package like this one, by watching our premium video course:

Laravel Package training

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Postcardware

You're free to use this package (it's MIT-licensed), but if it makes it to your production environment you are required to send us a postcard from your hometown, mentioning which of our package(s) you are using.

Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.

The best postcards will get published on the open source page on our website.

Installation

This package can be installed through Composer.

composer require spatie/checkout

There is a service provider you can make use of.

// app/config/app.php

'providers' => [
    '...',
    'Spatie\Checkout\CheckoutServiceProvider'
];

This package also comes with a facade, which provides an easy way to use this class.

// app/config/app.php

'aliases' => array(
	...
	'Checkout' => 'Spatie\Checkout\CheckoutFacade',
)

Usage

You can store the order id using this method:

    Checkout::setCurrentOrderId($yourOrderId);

Your order id will be stored in Laravel's session store.

You can retrieve the value with:

    Checkout::getCurrentOrderId();

These methods are also provided:

  • Checkout::clearCurrentOrderId(): Forget the previously stored value.
  • Checkout::isCurrentOrderId($orderId): Convenient method to determine if the given orderId is equal to the value stored with the previous call to setCurrentOrderId.

统计信息

  • 总下载量: 698
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 43
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 1

GitHub 信息

  • Stars: 42
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-08-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固