Initial Release
This commit is contained in:
66
src/Providers/LeenooksServiceProvider.php
Normal file
66
src/Providers/LeenooksServiceProvider.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace Leenooks\Providers;
|
||||
|
||||
#use Acacha\User\Http\Middleware\GuestUser;
|
||||
use Illuminate\Routing\Router;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
/**
|
||||
* Class GuestUserServiceProvider.
|
||||
*
|
||||
* @package Acacha\User\Providers
|
||||
*/
|
||||
class LeenooksServiceProvider extends ServiceProvider
|
||||
{
|
||||
private $_path = '';
|
||||
|
||||
/**
|
||||
* Bootstrap the application services.
|
||||
*
|
||||
* @param Router $router
|
||||
*/
|
||||
public function boot(Router $router)
|
||||
{
|
||||
|
||||
$this->loadViewsFrom($this->_path.'/resources/themes/adminlte/views/', 'adminlte');
|
||||
# $this->loadViewsFrom($this->_path.'/resources/views/', 'adminlte');
|
||||
$this->loadTranslationsFrom($this->_path.'/resources/themes/adminlte/lang/', 'adminlte_lang');
|
||||
//dd($this->views());
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
if (! $this->_path) {
|
||||
$this->_path = realpath(__DIR__.'/../../');
|
||||
define('LEENOOKS',realpath(__DIR__.'/../../'));
|
||||
}
|
||||
//$this->publishes($this->views());
|
||||
}
|
||||
|
||||
/**
|
||||
* Views copy path.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function views()
|
||||
{
|
||||
return [
|
||||
LEENOOKS.'/resources/views/auth' =>
|
||||
resource_path('views/vendor/adminlte/auth'),
|
||||
$this->_path.'/resources/views/errors' =>
|
||||
resource_path('views/vendor/adminlte/errors'),
|
||||
$this->_path.'/resources/views/layouts' =>
|
||||
resource_path('views/vendor/adminlte/layouts'),
|
||||
$this->_path.'/resources/views/home.blade.php' =>
|
||||
resource_path('views/vendor/adminlte/home.blade.php'),
|
||||
$this->_path.'/resources/views/welcome.blade.php' =>
|
||||
resource_path('views/welcome.blade.php'),
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user