<?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Auth;
abstract class Controller {
    protected function need(string $perm): void {
        abort_unless(Auth::user() && Auth::user()->canDo($perm), 403, 'No permission: '.$perm);
    }
}
