mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
e3e0d57f56
* Add IDE Helper files * Cleanup imports - Alphabetises imports - Removes unused imports * Add Platform requirements * Move filling asset into block where asset exists * Remove duplicate array keys
61 lines
1.5 KiB
PHP
61 lines
1.5 KiB
PHP
<?php
|
|
namespace App\Providers;
|
|
|
|
|
|
use App\Models\Accessory;
|
|
use App\Models\Asset;
|
|
use App\Models\Component;
|
|
use App\Models\Consumable;
|
|
use App\Models\License;
|
|
use App\Models\Setting;
|
|
use App\Observers\AccessoryObserver;
|
|
use App\Observers\AssetObserver;
|
|
use App\Observers\ComponentObserver;
|
|
use App\Observers\ConsumableObserver;
|
|
use App\Observers\LicenseObserver;
|
|
use App\Observers\SettingObserver;
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
/**
|
|
* This service provider handles setting the observers on models
|
|
*
|
|
* PHP version 5.5.9
|
|
* @version v3.0
|
|
*/
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Custom email array validation
|
|
*
|
|
* @author [A. Gianotto] [<snipe@snipe.net>]
|
|
* @since [v3.0]
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
Schema::defaultStringLength(191);
|
|
Asset::observe(AssetObserver::class);
|
|
Accessory::observe(AccessoryObserver::class);
|
|
Component::observe(ComponentObserver::class);
|
|
Consumable::observe(ConsumableObserver::class);
|
|
License::observe(LicenseObserver::class);
|
|
Setting::observe(SettingObserver::class);
|
|
}
|
|
|
|
/**
|
|
* Register any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
|
|
if (($this->app->environment('production')) && (config('services.rollbar.access_token'))){
|
|
$this->app->register(\Rollbar\Laravel\RollbarServiceProvider::class);
|
|
}
|
|
|
|
}
|
|
}
|