PHP code example of code16 / metrics

1. Go to this page and download the library: Download code16/metrics 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/ */

    

code16 / metrics example snippets


php artisan vendor:publish --provider="Code16\Metrics\MetricServiceProvider" --tag="config"

    use App\Product;
    use Code16\Metrics\Action;

    class AddToCart extends Action {

        public $productId;

        public function __construct(Product $product)
        {
            $this->productId = $product;
        }

    }