<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Config; 
use Illuminate\Support\Facades\Schema; 

// 1. PANGGIL CLASS OBSERVER
use App\Models\StockTransaction;
use App\Observers\StockTransactionObserver;

class AppServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        //
    }

   public function boot(): void
    {
        // 2. AKTIFKAN OBSERVER DISINI
        // "Setiap ada perubahan di StockTransaction, jalankan logic di Observer"
        StockTransaction::observe(StockTransactionObserver::class);


        // ========================================================
        // INTEGRASI PROTEKSI LISENSI (Biar Tetap Jalan)
        // ========================================================
        //$pathProteksi = app_path('Helpers/SystemCore.php');

        //if (file_exists($pathProteksi)) {
       //     require_once $pathProteksi;
       //     \E3BE8\cE2Ca\C7606::bbC7e(); 
      //  }
        // ========================================================
    }
}