koel/app/Http/Controllers/Controller.php
2024-07-06 17:44:47 +02:00

21 lines
568 B
PHP

<?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Http\Response;
use Illuminate\Routing\Controller as BaseController;
abstract class Controller extends BaseController
{
use AuthorizesRequests;
use DispatchesJobs;
use ValidatesRequests;
protected static function disableInDemo(int $code = Response::HTTP_FORBIDDEN): void
{
abort_if(config('koel.misc.demo'), $code);
}
}