add all controllers logic
This commit is contained in:
@@ -12,6 +12,25 @@ use App\Services\Invoices\InvoiceConfigService;
|
||||
use App\Services\Invoices\InvoiceGradeService;
|
||||
use App\Services\Invoices\InvoiceTuitionService;
|
||||
use App\Services\Staff\StaffTimeOffLinkService;
|
||||
use App\Models\NavItem;
|
||||
use App\Models\ClassSection;
|
||||
use App\Models\IpAttempt;
|
||||
use App\Models\LateSlipLog;
|
||||
use App\Models\Message;
|
||||
use App\Models\Preferences;
|
||||
use App\Models\Staff;
|
||||
use App\Models\SupportRequest;
|
||||
use App\Models\Setting;
|
||||
use App\Policies\NavItemPolicy;
|
||||
use App\Policies\ClassSectionPolicy;
|
||||
use App\Policies\IpAttemptPolicy;
|
||||
use App\Policies\LateSlipLogPolicy;
|
||||
use App\Policies\MessagePolicy;
|
||||
use App\Policies\PreferencesPolicy;
|
||||
use App\Policies\StaffPolicy;
|
||||
use App\Policies\SupportRequestPolicy;
|
||||
use App\Policies\SettingPolicy;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
@@ -48,6 +67,16 @@ class AppServiceProvider extends ServiceProvider
|
||||
|
||||
public function boot(): void
|
||||
{
|
||||
Gate::policy(NavItem::class, NavItemPolicy::class);
|
||||
Gate::policy(ClassSection::class, ClassSectionPolicy::class);
|
||||
Gate::policy(IpAttempt::class, IpAttemptPolicy::class);
|
||||
Gate::policy(LateSlipLog::class, LateSlipLogPolicy::class);
|
||||
Gate::policy(Message::class, MessagePolicy::class);
|
||||
Gate::policy(Preferences::class, PreferencesPolicy::class);
|
||||
Gate::policy(Staff::class, StaffPolicy::class);
|
||||
Gate::policy(SupportRequest::class, SupportRequestPolicy::class);
|
||||
Gate::policy(Setting::class, SettingPolicy::class);
|
||||
|
||||
$this->app->resolving(FormRequest::class, function (FormRequest $request, $app): void {
|
||||
$request->setContainer($app)->setRedirector($app->make(Redirector::class));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user