PHP code example of workos / workos-php-laravel
1. Go to this page and download the library: Download workos/workos-php-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/ */
workos / workos-php-laravel example snippets
use WorkOS\Laravel\Facades\WorkOS;
$user = WorkOS::userManagement()->getUser($id);
// or
$user = workos()->userManagement()->getUser($id);
// or
public function __construct(private \WorkOS\WorkOS $workos) {}
bash
composer bash
php artisan vendor:publish --provider="WorkOS\Laravel\WorkOSServiceProvider"