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