mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
37e4b67ab9
* Add URL link directly to client view in list view * Implement Form requests for all client routes * Refactor how permissions are implemented on Datatable row action menus * fixes for tests * bug fix * Add ctrans global function for custom translations. Reduced DB queries for Client List. Added Debugbar for dev environments * ctrans
45 lines
933 B
PHP
45 lines
933 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use Illuminate\Database\Eloquent\Relations\Relation;
|
|
use Illuminate\Support\Facades\Blade;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
Relation::morphMap([
|
|
'invoices' => '\App\Models\Invoice',
|
|
'proposals' => '\App\Models\Proposal',
|
|
]);
|
|
|
|
Blade::if('env', function($environment){
|
|
return config('ninja.environment') === $environment;
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Register any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
$this->loadHelpers();
|
|
}
|
|
|
|
protected function loadHelpers()
|
|
{
|
|
foreach (glob(__DIR__.'/../Helpers/*.php') as $filename) {
|
|
require_once $filename;
|
|
}
|
|
}
|
|
}
|