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

use Spatie\Permission\Models\Permission;

echo "All Permissions in Database:\n";
echo "============================\n";

$permissions = Permission::all();
foreach($permissions as $permission) {
    echo "- " . $permission->name . "\n";
}

echo "\nTotal: " . $permissions->count() . " permissions\n";