Summary of completed work: - Complete buyer portal (browse, cart, checkout, orders, invoices) - Complete seller portal (orders, manifests, fleet, picking) - Business onboarding wizards (buyer 4-step, seller 5-step) - Email verification and registration flows - Notification system for buyers and sellers - Payment term surcharges and pickup/delivery workflows - Filament admin resources (Business, Brand, Product, Order, Invoice, User) - 51 migrations executed successfully Renamed Company -> Business throughout codebase for consistency. Unified authentication flows with password reset. Added audit trail and telescope for debugging. Next: Week 4 Data Migration (Days 22-28) - Product migration (883 products from cannabrands_crm) - Company migration (81 buyer companies) - User migration (preserve password hashes) - Order history migration
59 lines
1.4 KiB
PHP
59 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\User;
|
|
use App\Models\Business;
|
|
use App\Observers\UserObserver;
|
|
use App\Observers\CompanyObserver;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\Auth;
|
|
use Illuminate\Support\Facades\File;
|
|
use Illuminate\Support\Facades\Route;
|
|
use Illuminate\Support\Facades\View;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Illuminate\Validation\Rules\Password;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
// Configure password validation defaults
|
|
Password::defaults(function () {
|
|
return Password::min(8)
|
|
->mixedCase()
|
|
->numbers()
|
|
->symbols();
|
|
});
|
|
|
|
// Register model observers
|
|
User::observe(UserObserver::class);
|
|
Business::observe(CompanyObserver::class);
|
|
|
|
View::composer('*', function ($view) {
|
|
$version = 'unknown';
|
|
$path = base_path('version.txt');
|
|
|
|
if (File::exists($path)) {
|
|
$full = trim(File::get($path));
|
|
if (preg_match('/^\d+\.\d+\.\d+/', $full, $matches)) {
|
|
$version = $matches[0];
|
|
}
|
|
}
|
|
|
|
$view->with('appVersion', $version);
|
|
});
|
|
}
|
|
}
|