22 lines
643 B
PHP
22 lines
643 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Http\Controllers\Concerns\FlashesToasts;
|
|
use App\Http\Controllers\Concerns\ValidatesHtmx;
|
|
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
|
use Illuminate\Foundation\Validation\ValidatesRequests;
|
|
use Illuminate\Routing\Controller as BaseController;
|
|
|
|
abstract class Controller
|
|
{
|
|
// add authorization requests to the base controller
|
|
use AuthorizesRequests;
|
|
use ValidatesRequests;
|
|
|
|
// add error handling with HTMX and toast handling
|
|
// controllers now get $this->validateHtmx(), $this->toast(), $this->redirectWithToast()
|
|
use ValidatesHtmx;
|
|
use FlashesToasts;
|
|
}
|