Skip to content

Commit

Permalink
Reformat the service provider
Browse files Browse the repository at this point in the history
  • Loading branch information
imanghafoori1 committed Oct 10, 2023
1 parent dbd23fd commit 2ade35e
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<?php namespace Rap2hpoutre\LaravelLogViewer;
<?php

namespace Rap2hpoutre\LaravelLogViewer;

use Illuminate\Support\ServiceProvider;

class LaravelLogViewerServiceProvider extends ServiceProvider {
class LaravelLogViewerServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application events.
*
Expand All @@ -11,21 +14,20 @@ class LaravelLogViewerServiceProvider extends ServiceProvider {
public function boot()
{
if (method_exists($this, 'package')) {
$this->package('rap2hpoutre/laravel-log-viewer', 'laravel-log-viewer', __DIR__ . '/../../');
$this->package('rap2hpoutre/laravel-log-viewer', 'laravel-log-viewer', __DIR__.'/../../');
}

if (method_exists($this, 'loadViewsFrom')) {
$this->loadViewsFrom(__DIR__.'/../../views', 'laravel-log-viewer');
}

if (method_exists($this, 'publishes')) {
$this->publishes([
__DIR__.'/../../views' => base_path('/resources/views/vendor/laravel-log-viewer'),
__DIR__.'/../../views' => base_path('/resources/views/vendor/laravel-log-viewer'),
], 'views');
$this->publishes([
__DIR__.'/../../config/logviewer.php' => $this->config_path('logviewer.php'),
]);

}
}

Expand All @@ -42,12 +44,12 @@ public function register()
/**
* Get the configuration path.
*
* @param string $path
* @param string $path
* @return string
*/
private function config_path($path = '')
{
return function_exists('config_path') ? config_path($path) : app()->basePath() . DIRECTORY_SEPARATOR . 'config' . ($path ? DIRECTORY_SEPARATOR . $path : $path);
return function_exists('config_path') ? config_path($path) : app()->basePath().DIRECTORY_SEPARATOR.'config'.($path ? DIRECTORY_SEPARATOR.$path : $path);
}

}

0 comments on commit 2ade35e

Please sign in to comment.