PHP code example of inmanturbo / homework-starter-kit
1. Go to this page and download the library: Download inmanturbo/homework-starter-kit 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/ */
inmanturbo / homework-starter-kit example snippets
use WorkOS\WorkOS;
public function boot()
{
$baseUrl = config('services.workos.base_url');
if ($baseUrl && $baseUrl !== 'https://api.workos.com/') {
WorkOS::setApiBaseUrl($baseUrl);
}
}
// In AppServiceProvider
public function boot()
{
if (app()->environment('local')) {
WorkOS::setApiBaseUrl('http://localhost:8000/');
}
}
use Illuminate\Database\Eloquent\Concerns\HasUlids;
class User extends Authenticatable
{
use HasApiTokens, HasFactory, HasUlids, Notifiable, TwoFactorAuthenticatable;
// ...
}
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\Models\CustomUser::class, // Your custom model
],
],