PHP code example of mrpunyapal / nativephp-plugin-impressions
1. Go to this page and download the library: Download mrpunyapal/nativephp-plugin-impressions 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/ */
mrpunyapal / nativephp-plugin-impressions example snippets
bash
php artisan native:plugin:validate ../../../packages/nativephp-plugin-impressions
blade
<native:impression
native:key="impression-{{ $post['id'] }}"
identity="{{ $post['id'] }}"
:enabled="true"
:threshold="0.5"
:dwell-ms="500"
on-impression="recordPostView('{{ $post['id'] }}')"
class="w-full"
>
<native:text :text="$post['answer']" />
</native:impression>