PHP code example of whilesmart / eloquent-entitlements
1. Go to this page and download the library: Download whilesmart/eloquent-entitlements 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/ */
whilesmart / eloquent-entitlements example snippets
use Whilesmart\Entitlements\Traits\HasEntitlements;
class Workspace extends Model
{
use HasEntitlements;
}
$workspace->entitledTo('reports'); // delegates to the bound Entitlements
$workspace->limitFor('seats');
$workspace->activeSubscription();
public function resolve(?Model $owner): ?ResolvedPlan;