Files
hoshpoint-backend/app/Providers/AppServiceProvider.php
soheil khaledabadi 46ae711a20 feat(api): add AI text-to-deck generation, wallet deposit structure, and profile/notification endpoints
Fills the gaps between the admin panel screens and the backend: a full
free-text + slide-count + language -> AI-generated presentation flow with
new slide-cloning logic in TemplateFillService, a "my presentations" list
endpoint, a swappable payment-gateway structure for wallet top-ups (fake
driver for now), and avatar upload / public-profile toggle / account
deletion / password change / notification preference endpoints.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-29 01:36:17 +03:30

54 lines
1.6 KiB
PHP

<?php
namespace App\Providers;
use App\Contracts\PaymentGateway;
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 App\Services\Payments\FakePaymentGateway;
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
{
// Swap this binding for a real gateway (ZarinPal, Zibal, ...) once one is integrated.
$this->app->bind(PaymentGateway::class, FakePaymentGateway::class);
}
/**
* 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);
}
}