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

$role = Spatie\Permission\Models\Role::where('name','member')->first();
if(! $role){ echo "role not found\n"; return; }

echo 'role_id=' . $role->id . PHP_EOL;
echo 'role_permissions=' . $role->permissions()->pluck('name')->implode(', ') . PHP_EOL;
echo 'role_permissions_relation=' . $role->permissions->pluck('name')->implode(', ') . PHP_EOL;
