PHP code example of rezkonline / laravel-meta-pixel

1. Go to this page and download the library: Download rezkonline/laravel-meta-pixel 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/ */

    

rezkonline / laravel-meta-pixel example snippets


// config/app.php

'providers' => [
    //
    \Rezkonline\LaravelMetaPixel\Providers\MetaPixelServiceProvider::class,
    //
],

'facades' => [
    //
    'LaravelMetaPixel' => \Rezkonline\LaravelMetaPixel\Facades\MetaPixelFacade::class,
    //
],

return [
    /*
     * The Facebook Meta ID.
     */
    'meta_pixel_id' => env('META_PIXEL_ID', ''),
];

\LaravelMetaPixel::addToCartEvent([
    // List of event parameters
])
bash
php artisan vendor:publish --provider="Rezkonline\LaravelMetaPixel\Providers\MetaPixelServiceProvider"
blade
{{-- layout.blade.php --}}
<html>
  <head>
    @}}
  </body>
</html>