PHP code example of aazsamir / libphpsky-laravel
1. Go to this page and download the library: Download aazsamir/libphpsky-laravel 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/ */
aazsamir / libphpsky-laravel example snippets
namespace App\Http\Controllers;
use Aazsamir\Libphpsky\Model\Meta\ATProtoMetaClient;
use Aazsamir\Libphpsky\Model\Com\Atproto\Identity\ResolveHandle\ResolveHandle;
class MyController extends Controller
{
public function __construct(
private ATProtoMetaClient $metaClient,
private ResolveHandle $resolveHandle
) {}
public function index()
{
// use ATProtoMetaClient
dd($this->metaClient->comAtprotoIdentityResolveHandle()->query('bsky.app'));
// or plain Libphpsky type
dd($this->resolveHandle->query('bsky.app'));
// or if you're not a fan of dependency injection
dd(ResolveHandle::default()->query('bsky.app'));
}
}