PHP code example of smariqislam / coupon

1. Go to this page and download the library: Download smariqislam/coupon library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

smariqislam / coupon example snippets




  return [
    'product_model'           => '\App\Models\Course', // your product model
    'product_primary_key'     => 'id', // product model primary key
    'product_display_column'  => 'name', //product model display name column
    'product_category_column' => 'course_category_id', //product model category name column or display column
    'product_price_column'    => 'price', //product model price column
    'category_model'          => '\App\Models\CourseCategory', // your product category model
    'category_primary_key'    => 'id', // product category primary key
    'category_display_column' => 'name',// product category name or display column
    'api_route_base_prefix'   => 'api', // set route prefixes
    'api_middlewares'         => ['auth:sanctum'], // set middlewares
    'per_page_data'           => 10, //optional 
  ];