PHP code example of astrotomic / laravel-webmentions

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

    

astrotomic / laravel-webmentions example snippets


return [
    // ...
    'webmention' => [
        'token' => env('WEBMENTION_TOKEN'),
    ],
    // ...
];

use Astrotomic\Webmentions\Facades\Webmentions;

$records = Webmentions::get('https://gummibeer.dev/blog/2020/human-readable-intervals');

use Astrotomic\Webmentions\Facades\Webmentions;

$likes = Webmentions::likes('https://gummibeer.dev/blog/2020/human-readable-intervals');
$mentions = Webmentions::mentions('https://gummibeer.dev/blog/2020/human-readable-intervals');
$replies = Webmentions::replies('https://gummibeer.dev/blog/2020/human-readable-intervals');
$reposts = Webmentions::reposts('https://gummibeer.dev/blog/2020/human-readable-intervals');

use Astrotomic\Webmentions\Facades\Webmentions;

$counts = Webmentions::count('https://gummibeer.dev/blog/2020/human-readable-intervals');
[
  'count' => 52,
  'type' => [
    'like' => 23,
    'mention' => 8,
    'reply' => 16,
    'repost' => 5,
  ],
];