Download the PHP package ashadozzaman/coupon without Composer

On this page you can find all versions of the php package ashadozzaman/coupon. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package coupon

Laravel Coupon 🎟

This package generate coupon/discount for any kinds of course or product selling website...🎟

Latest Version on Packagist Total Downloads
Here is an example of how you can create coupon them:

Installation

You can install the package via composer:

Now you should register CouponServiceProvider in config/app.php

The package will automatically register itself.

You can publish the migration with below command, it's copy generate file config/coupon.php also crate folde views/vendor/coupon for create coupon, it you want you can change all file design. But don't cut form structure...

config/coupon.php file show bellow. here you set you necessary information

After the migration has been published you can create the vouchers table by running the migrations:

Usage

The basic concept of this package is that you can create coupon by admin for specific course/product and course/product category. For access this feature you declure your admin authentication middleware in config/coupon.php file like bellow:-

Model Declare

You must be declare your coupon related items models like products/coures and categories table model example show bellow:-

After complete middleware register. Now you able to access create coupon in you admin section. Now you just call two route for creating coupon. Two route show bellow:-

Admin coupon create process done here

Use Coupon In Frontend 🎟

Coupon use basically in your checkout page. So you just use coupon easily in checkout page with same route. Show example bellow code:-

route/web.php (It's only example, you write code in your own way)

Http/Controllers/HomeController.php (It's only example, you write code in your own way)

In controller must be use bellow Trait:-

This function is work in my side. It's show for example perpose.

Using this trait function check coupon status, for use coupon time. Must be pass necesary all perameter. This function return response in array. In array pass two type status 1. success 2. error.

Response example bellow show:-

checkout.blade.php (It's only example, you write code in your own way)

After use coupon, when you submit checkout form that's mean when you save checkout details. You must be call bellow trail function:-

Using this function store coupon used user and coupon code. So must be call this after save checkout details. Bellow show details example:-

Respone example show bellow:-

Contributor

Ashadozzaman Shvou([email protected])

Support

For any query please send email to [email protected]

License

The MIT License (MIT). Please see License File for more information.


All versions of coupon with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ashadozzaman/coupon contains the following files

Loading the files please wait ...