<?php
require __DIR__ . '/../vendor/autoload.php';
$app = require __DIR__ . '/../bootstrap/app.php';
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();

$u = App\Models\User::where('email', 'member@example.com')->first();
if (! $u) { echo "member not found\n"; return; }

$rows = Illuminate\Support\Facades\DB::table('model_has_permissions')->where('model_id', $u->id)->get();
echo 'model_has_permissions_rows=' . $rows->count() . PHP_EOL;
foreach ($rows as $r) {
  echo 'model_type=' . $r->model_type . ', permission_id=' . $r->permission_id . PHP_EOL;
}
