2015-12-13 04:42:28 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
|
2015-12-14 13:22:39 +00:00
|
|
|
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
2015-12-13 04:42:28 +00:00
|
|
|
use Illuminate\Foundation\Bus\DispatchesJobs;
|
|
|
|
use Illuminate\Foundation\Validation\ValidatesRequests;
|
2024-02-25 19:32:53 +00:00
|
|
|
use Illuminate\Http\Response;
|
2015-12-14 13:22:39 +00:00
|
|
|
use Illuminate\Routing\Controller as BaseController;
|
2015-12-13 04:42:28 +00:00
|
|
|
|
|
|
|
abstract class Controller extends BaseController
|
|
|
|
{
|
2020-01-17 16:45:45 +00:00
|
|
|
use AuthorizesRequests;
|
|
|
|
use DispatchesJobs;
|
|
|
|
use ValidatesRequests;
|
2024-02-25 19:32:53 +00:00
|
|
|
|
|
|
|
protected static function disableInDemo(int $code = Response::HTTP_FORBIDDEN): void
|
|
|
|
{
|
|
|
|
abort_if(config('koel.misc.demo'), $code);
|
|
|
|
}
|
2015-12-13 04:42:28 +00:00
|
|
|
}
|