First Commit

This commit is contained in:
marco
2026-09-01 07:49:48 -03:00
commit 28b1044038
399 changed files with 41659 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
<?php
namespace App\Providers;
use App\Http\View\Composers\NavigationComposer;
use Illuminate\Support\Facades\View;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
public function register(): void
{
//
}
public function boot(): void
{
\Illuminate\Cookie\Middleware\EncryptCookies::except('cookie_consent_accepted');
View::composer('layouts.navigation', NavigationComposer::class);
}
}
+38
View File
@@ -0,0 +1,38 @@
<?php
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;
use App\Models\Subject;
use App\Models\UserInterest;
use App\Policies\SubjectPolicy;
use App\Policies\UserInterestPolicy;
/**
* Application authentication and authorization service provider.
*/
class AuthServiceProvider extends ServiceProvider
{
/**
* The model to policy mappings for the application.
*/
protected $policies = [
Subject::class => SubjectPolicy::class,
UserInterest::class => UserInterestPolicy::class,
];
/**
* Register any authentication / authorization services.
*/
public function boot(): void
{
$this->registerPolicies();
Gate::before(function ($user, $ability) {
if ($user->hasRole('superadmin')) {
return true;
}
});
}
}
+21
View File
@@ -0,0 +1,21 @@
<?php
namespace App\Providers;
use App\Listeners\SendNewUserNotification;
use Illuminate\Auth\Events\Registered;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
protected $listen = [
Registered::class => [
SendNewUserNotification::class,
],
];
public function boot(): void
{
//
}
}