Skip to content

shopavel/customers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Customers package for Shopavel

Installation

Add "shopavel/customers": "1.0.*" to your composer.json and run composer update.

This package is required by shopavel/shop, you will not normally have to specifically require this package.

Configuration

In app/config/app.php add 'Shopavel\Customers\CustomersServiceProvider' to your providers list and 'Customer' => 'Shopavel\Customers\Facades\Customer' to your aliases list.

Usage

Customer

You can use the Customer alias to access the customer eloquent model.

Basket

$basket = Customer::find(1)->getBasket();

Orders

$orders = Customer::find(1)->getOrders();

Registration

Use the customer.registration service to register customers.

Register a customer

app('customer.registration')->register($customer);

Authorisation

Use the customer.auth service to manage authentication of customers.

Authenticate a customer

app('customer.auth')->authenticate($email, $password);

Log out a customer

app('customer.auth')->logout();

Basket

Use the customer.basket service to manage the customer's basket.

Set the customers basket

app('customer.basket')->setBasket($customer, $basket);

Orders

Use the customer.orders service to access the customer's orders.

Add an order to a customer

app('customer.orders')->addOrder($customer, $order);

License

All Shopavel packages are open-sourced software licensed under the MIT license

About

Customers package for Shopavel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages