for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Laravel Auditing package.
*
* @author Antério Vieira <[email protected]>
* @author Quetzy Garcia <[email protected]>
* @author Raphael França <[email protected]>
* @copyright 2015-2018
* For the full copyright and license information,
* please view the LICENSE.md file that was distributed
* with this source code.
*/
namespace OwenIt\Auditing;
use Illuminate\Support\ServiceProvider;
use OwenIt\Auditing\Console\AuditDriverMakeCommand;
use OwenIt\Auditing\Console\AuditTableCommand;
use OwenIt\Auditing\Console\InstallCommand;
use OwenIt\Auditing\Contracts\Auditor;
class AuditingServiceProvider extends ServiceProvider
{
* {@inheritdoc}
protected $defer = true;
* Bootstrap the service provider.
* @return void
public function boot()
$config = realpath(__DIR__).'/../config/audit.php';
if ($this->app->runningInConsole()) {
$this->publishes([
$config => base_path('config/audit.php'),
]);
}
$this->mergeConfigFrom($config, 'audit');
* Register the service provider.
public function register()
$this->commands([
AuditTableCommand::class,
AuditDriverMakeCommand::class,
InstallCommand::class,
$this->app->singleton(Auditor::class, function ($app) {
return new \OwenIt\Auditing\Auditor($app);
});
public function provides()
return [
Auditor::class,
];