chore: update composer dependencies to include phppresentation chore: update composer.lock after adding phppresentation feat: create categories migration for category management feat: create templates migration for template storage feat: create template generations migration for tracking template usage feat: create template keys migration for template customization feat: create notifications migration for user notifications feat: update API routes for categories, templates, and user profile management docs: update API documentation to include new endpoints for profile and wallet
51 lines
1.4 KiB
PHP
51 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\Notification;
|
|
use App\Models\Permission;
|
|
use App\Models\Role;
|
|
use App\Models\User;
|
|
use App\Models\Wallet;
|
|
use App\Models\WalletTransaction;
|
|
use App\Observers\UserObserver;
|
|
use App\Policies\NotificationPolicy;
|
|
use App\Policies\PermissionPolicy;
|
|
use App\Policies\RolePolicy;
|
|
use App\Policies\UserPolicy;
|
|
use App\Policies\WalletPolicy;
|
|
use App\Policies\WalletTransactionPolicy;
|
|
use Illuminate\Support\Facades\Gate;
|
|
use Illuminate\Support\Facades\URL;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
if (app()->environment('production') || str_starts_with((string) config('app.url'), 'https://')) {
|
|
URL::forceScheme('https');
|
|
}
|
|
|
|
User::observe(UserObserver::class);
|
|
|
|
Gate::policy(User::class, UserPolicy::class);
|
|
Gate::policy(Role::class, RolePolicy::class);
|
|
Gate::policy(Permission::class, PermissionPolicy::class);
|
|
Gate::policy(Wallet::class, WalletPolicy::class);
|
|
Gate::policy(WalletTransaction::class, WalletTransactionPolicy::class);
|
|
Gate::policy(Notification::class, NotificationPolicy::class);
|
|
}
|
|
}
|