2017-11-03 16:26:07 +11:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
2024-07-04 15:03:11 +10:00
|
|
|
use Illuminate\Support\Facades\Gate;
|
2024-08-10 23:53:13 +10:00
|
|
|
use Illuminate\Support\Facades\Route;
|
2017-11-03 16:26:07 +11:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
2024-07-14 13:49:00 +10:00
|
|
|
use Intuit\Traits\IntuitSocialite;
|
2017-11-03 16:26:07 +11:00
|
|
|
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
|
|
{
|
2024-07-14 13:49:00 +10:00
|
|
|
use IntuitSocialite;
|
2021-07-01 19:41:12 +10:00
|
|
|
|
2017-11-03 16:26:07 +11:00
|
|
|
/**
|
2019-06-02 15:35:48 +10:00
|
|
|
* Register any application services.
|
2017-11-03 16:26:07 +11:00
|
|
|
*/
|
2024-07-04 15:03:11 +10:00
|
|
|
public function register(): void
|
2017-11-03 16:26:07 +11:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2019-06-02 15:35:48 +10:00
|
|
|
* Bootstrap any application services.
|
2017-11-03 16:26:07 +11:00
|
|
|
*/
|
2024-07-04 15:03:11 +10:00
|
|
|
public function boot(): void
|
2017-11-03 16:26:07 +11:00
|
|
|
{
|
2024-07-04 15:03:11 +10:00
|
|
|
Gate::define('wholesaler', function ($user) {
|
|
|
|
return $user->isWholesaler();
|
|
|
|
});
|
|
|
|
|
|
|
|
Gate::define('reseller', function ($user) {
|
|
|
|
return $user->isReseller();
|
|
|
|
});
|
2024-07-14 13:49:00 +10:00
|
|
|
|
|
|
|
$this->bootIntuitSocialite();
|
2024-08-10 23:53:13 +10:00
|
|
|
|
|
|
|
Route::model('co',\App\Models\Checkout::class);
|
|
|
|
Route::model('po',\App\Models\Payment::class);
|
2024-08-14 22:16:09 +10:00
|
|
|
Route::model('pdo',\App\Models\Product::class);
|
2024-08-17 10:33:56 +10:00
|
|
|
Route::model('so',\App\Models\Service::class);
|
2017-11-03 16:26:07 +11:00
|
|
|
}
|
2024-07-28 21:33:30 +10:00
|
|
|
}
|