Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
a86e2688
Commit
a86e2688
authored
Jul 03, 2018
by
Huy Dang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix route:cache and config:cache issue
parent
18e0817d
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
91 additions
and
66 deletions
+91
-66
core.php
Modules/Core/Config/core.php
+7
-0
CoreServiceProvider.php
Modules/Core/Providers/CoreServiceProvider.php
+1
-1
RoutingServiceProvider.php
Modules/Core/Providers/RoutingServiceProvider.php
+24
-8
backendRoutes.php
Modules/Media/Http/backendRoutes.php
+0
-4
MediaServiceProvider.php
Modules/Media/Providers/MediaServiceProvider.php
+4
-0
backendRoutes.php
Modules/Menu/Http/backendRoutes.php
+0
-7
MenuServiceProvider.php
Modules/Menu/Providers/MenuServiceProvider.php
+7
-0
apiRoutes.php
Modules/Page/Http/apiRoutes.php
+0
-4
backendRoutes.php
Modules/Page/Http/backendRoutes.php
+0
-4
frontendRoutes.php
Modules/Page/Http/frontendRoutes.php
+10
-12
PageServiceProvider.php
Modules/Page/Providers/PageServiceProvider.php
+4
-0
backendRoutes.php
Modules/Tag/Http/backendRoutes.php
+0
-3
TagServiceProvider.php
Modules/Tag/Providers/TagServiceProvider.php
+4
-0
backendRoutes.php
Modules/Translation/Http/backendRoutes.php
+0
-3
TranslationServiceProvider.php
Modules/Translation/Providers/TranslationServiceProvider.php
+5
-0
apiRoutes.php
Modules/User/Http/apiRoutes.php
+0
-10
backendRoutes.php
Modules/User/Http/backendRoutes.php
+0
-3
UserServiceProvider.php
Modules/User/Providers/UserServiceProvider.php
+10
-0
backendRoutes.php
Modules/Workshop/Http/backendRoutes.php
+0
-7
WorkshopServiceProvider.php
Modules/Workshop/Providers/WorkshopServiceProvider.php
+8
-0
core.php
config/asgard/core/core.php
+7
-0
No files found.
Modules/Core/Config/core.php
View file @
a86e2688
...
@@ -172,4 +172,11 @@ return [
...
@@ -172,4 +172,11 @@ return [
| useViewNamespaces.backend-theme needs to be enabled at module level
| useViewNamespaces.backend-theme needs to be enabled at module level
*/
*/
'enable-theme-overrides'
=>
false
,
'enable-theme-overrides'
=>
false
,
/*
|--------------------------------------------------------------------------
| Check if asgard was installed
|--------------------------------------------------------------------------
*/
'is_installed'
=>
env
(
'INSTALLED'
,
false
)
];
];
Modules/Core/Providers/CoreServiceProvider.php
View file @
a86e2688
...
@@ -70,7 +70,7 @@ class CoreServiceProvider extends ServiceProvider
...
@@ -70,7 +70,7 @@ class CoreServiceProvider extends ServiceProvider
public
function
register
()
public
function
register
()
{
{
$this
->
app
->
singleton
(
'asgard.isInstalled'
,
function
()
{
$this
->
app
->
singleton
(
'asgard.isInstalled'
,
function
()
{
return
true
===
env
(
'INSTALLED'
,
false
);
return
true
===
config
(
'asgard.core.core.is_installed'
);
});
});
$this
->
app
->
singleton
(
'asgard.onBackend'
,
function
()
{
$this
->
app
->
singleton
(
'asgard.onBackend'
,
function
()
{
return
$this
->
onBackend
();
return
$this
->
onBackend
();
...
...
Modules/Core/Providers/RoutingServiceProvider.php
View file @
a86e2688
...
@@ -52,14 +52,30 @@ abstract class RoutingServiceProvider extends ServiceProvider
...
@@ -52,14 +52,30 @@ abstract class RoutingServiceProvider extends ServiceProvider
$this
->
loadApiRoutes
(
$router
);
$this
->
loadApiRoutes
(
$router
);
});
});
$router
->
group
([
$prefixes
=
$this
->
getPrefixes
();
'namespace'
=>
$this
->
namespace
,
foreach
(
$prefixes
as
$prefix
)
{
'prefix'
=>
LaravelLocalization
::
setLocale
(),
$router
->
group
([
'middleware'
=>
[
'localizationRedirect'
,
'web'
],
'namespace'
=>
$this
->
namespace
,
],
function
(
Router
$router
)
{
'prefix'
=>
$prefix
,
$this
->
loadBackendRoutes
(
$router
);
'middleware'
=>
[
'localizationRedirect'
,
'web'
],
$this
->
loadFrontendRoutes
(
$router
);
],
function
(
Router
$router
)
{
});
$this
->
loadBackendRoutes
(
$router
);
$this
->
loadFrontendRoutes
(
$router
);
});
}
}
/**
* Get locale prefixes
* @return array
*/
private
function
getPrefixes
()
{
if
(
app
(
'asgard.isInstalled'
))
{
return
array_merge
(
json_decode
(
setting
(
'core::locales'
)),
[
''
]);
}
return
[
LaravelLocalization
::
setLocale
()];
}
}
/**
/**
...
...
Modules/Media/Http/backendRoutes.php
View file @
a86e2688
...
@@ -3,10 +3,6 @@
...
@@ -3,10 +3,6 @@
use
Illuminate\Routing\Router
;
use
Illuminate\Routing\Router
;
/** @var Router $router */
/** @var Router $router */
$router
->
bind
(
'media'
,
function
(
$id
)
{
return
app
(
\Modules\Media\Repositories\FileRepository
::
class
)
->
find
(
$id
);
});
$router
->
group
([
'prefix'
=>
'/media'
],
function
(
Router
$router
)
{
$router
->
group
([
'prefix'
=>
'/media'
],
function
(
Router
$router
)
{
$router
->
get
(
'media'
,
[
$router
->
get
(
'media'
,
[
'as'
=>
'admin.media.media.index'
,
'as'
=>
'admin.media.media.index'
,
...
...
Modules/Media/Providers/MediaServiceProvider.php
View file @
a86e2688
...
@@ -72,6 +72,10 @@ class MediaServiceProvider extends ServiceProvider
...
@@ -72,6 +72,10 @@ class MediaServiceProvider extends ServiceProvider
$event
->
load
(
'media'
,
array_dot
(
trans
(
'media::media'
)));
$event
->
load
(
'media'
,
array_dot
(
trans
(
'media::media'
)));
$event
->
load
(
'folders'
,
array_dot
(
trans
(
'media::folders'
)));
$event
->
load
(
'folders'
,
array_dot
(
trans
(
'media::folders'
)));
});
});
app
(
'router'
)
->
bind
(
'media'
,
function
(
$id
)
{
return
app
(
FileRepository
::
class
)
->
find
(
$id
);
});
}
}
public
function
boot
(
DispatcherContract
$events
)
public
function
boot
(
DispatcherContract
$events
)
...
...
Modules/Menu/Http/backendRoutes.php
View file @
a86e2688
...
@@ -3,13 +3,6 @@
...
@@ -3,13 +3,6 @@
use
Illuminate\Routing\Router
;
use
Illuminate\Routing\Router
;
/** @var Router $router */
/** @var Router $router */
$router
->
bind
(
'menu'
,
function
(
$id
)
{
return
app
(
\Modules\Menu\Repositories\MenuRepository
::
class
)
->
find
(
$id
);
});
$router
->
bind
(
'menuitem'
,
function
(
$id
)
{
return
app
(
\Modules\Menu\Repositories\MenuItemRepository
::
class
)
->
find
(
$id
);
});
$router
->
group
([
'prefix'
=>
'/menu'
],
function
(
Router
$router
)
{
$router
->
group
([
'prefix'
=>
'/menu'
],
function
(
Router
$router
)
{
$router
->
get
(
'menus'
,
[
$router
->
get
(
'menus'
,
[
'as'
=>
'admin.menu.menu.index'
,
'as'
=>
'admin.menu.menu.index'
,
...
...
Modules/Menu/Providers/MenuServiceProvider.php
View file @
a86e2688
...
@@ -54,6 +54,13 @@ class MenuServiceProvider extends ServiceProvider
...
@@ -54,6 +54,13 @@ class MenuServiceProvider extends ServiceProvider
$event
->
load
(
'menu'
,
array_dot
(
trans
(
'menu::menu'
)));
$event
->
load
(
'menu'
,
array_dot
(
trans
(
'menu::menu'
)));
$event
->
load
(
'menu-items'
,
array_dot
(
trans
(
'menu::menu-items'
)));
$event
->
load
(
'menu-items'
,
array_dot
(
trans
(
'menu::menu-items'
)));
});
});
app
(
'router'
)
->
bind
(
'menu'
,
function
(
$id
)
{
return
app
(
MenuRepository
::
class
)
->
find
(
$id
);
});
app
(
'router'
)
->
bind
(
'menuitem'
,
function
(
$id
)
{
return
app
(
MenuItemRepository
::
class
)
->
find
(
$id
);
});
}
}
/**
/**
...
...
Modules/Page/Http/apiRoutes.php
View file @
a86e2688
...
@@ -3,10 +3,6 @@
...
@@ -3,10 +3,6 @@
use
Illuminate\Routing\Router
;
use
Illuminate\Routing\Router
;
/** @var Router $router */
/** @var Router $router */
$router
->
bind
(
'page'
,
function
(
$id
)
{
return
app
(
\Modules\Page\Repositories\PageRepository
::
class
)
->
find
(
$id
);
});
$router
->
group
([
'prefix'
=>
'/page'
,
'middleware'
=>
[
'api.token'
,
'auth.admin'
]],
function
(
Router
$router
)
{
$router
->
group
([
'prefix'
=>
'/page'
,
'middleware'
=>
[
'api.token'
,
'auth.admin'
]],
function
(
Router
$router
)
{
$router
->
get
(
'pages'
,
[
$router
->
get
(
'pages'
,
[
'as'
=>
'api.page.page.index'
,
'as'
=>
'api.page.page.index'
,
...
...
Modules/Page/Http/backendRoutes.php
View file @
a86e2688
...
@@ -3,10 +3,6 @@
...
@@ -3,10 +3,6 @@
use
Illuminate\Routing\Router
;
use
Illuminate\Routing\Router
;
/** @var Router $router */
/** @var Router $router */
$router
->
bind
(
'page'
,
function
(
$id
)
{
return
app
(
\Modules\Page\Repositories\PageRepository
::
class
)
->
find
(
$id
);
});
$router
->
group
([
'prefix'
=>
'/page'
],
function
(
Router
$router
)
{
$router
->
group
([
'prefix'
=>
'/page'
],
function
(
Router
$router
)
{
$router
->
get
(
'pages'
,
[
$router
->
get
(
'pages'
,
[
'as'
=>
'admin.page.page.index'
,
'as'
=>
'admin.page.page.index'
,
...
...
Modules/Page/Http/frontendRoutes.php
View file @
a86e2688
...
@@ -3,15 +3,13 @@
...
@@ -3,15 +3,13 @@
use
Illuminate\Routing\Router
;
use
Illuminate\Routing\Router
;
/** @var Router $router */
/** @var Router $router */
if
(
!
App
::
runningInConsole
())
{
$router
->
get
(
'/'
,
[
$router
->
get
(
'/'
,
[
'uses'
=>
'PublicController@homepage'
,
'uses'
=>
'PublicController@homepage'
,
'as'
=>
'homepage'
,
'as'
=>
'homepage'
,
'middleware'
=>
config
(
'asgard.page.config.middleware'
),
'middleware'
=>
config
(
'asgard.page.config.middleware'
),
]);
]);
$router
->
any
(
'{uri}'
,
[
$router
->
any
(
'{uri}'
,
[
'uses'
=>
'PublicController@uri'
,
'uses'
=>
'PublicController@uri'
,
'as'
=>
'page'
,
'as'
=>
'page'
,
'middleware'
=>
config
(
'asgard.page.config.middleware'
),
'middleware'
=>
config
(
'asgard.page.config.middleware'
),
])
->
where
(
'uri'
,
'.*'
);
])
->
where
(
'uri'
,
'.*'
);
}
Modules/Page/Providers/PageServiceProvider.php
View file @
a86e2688
...
@@ -45,6 +45,10 @@ class PageServiceProvider extends ServiceProvider
...
@@ -45,6 +45,10 @@ class PageServiceProvider extends ServiceProvider
$this
->
app
[
'events'
]
->
listen
(
LoadingBackendTranslations
::
class
,
function
(
LoadingBackendTranslations
$event
)
{
$this
->
app
[
'events'
]
->
listen
(
LoadingBackendTranslations
::
class
,
function
(
LoadingBackendTranslations
$event
)
{
$event
->
load
(
'pages'
,
array_dot
(
trans
(
'page::pages'
)));
$event
->
load
(
'pages'
,
array_dot
(
trans
(
'page::pages'
)));
});
});
app
(
'router'
)
->
bind
(
'page'
,
function
(
$id
)
{
return
app
(
PageRepository
::
class
)
->
find
(
$id
);
});
}
}
public
function
boot
()
public
function
boot
()
...
...
Modules/Tag/Http/backendRoutes.php
View file @
a86e2688
...
@@ -4,9 +4,6 @@ use Illuminate\Routing\Router;
...
@@ -4,9 +4,6 @@ use Illuminate\Routing\Router;
/** @var Router $router */
/** @var Router $router */
$router
->
group
([
'prefix'
=>
'tag'
],
function
(
Router
$router
)
{
$router
->
group
([
'prefix'
=>
'tag'
],
function
(
Router
$router
)
{
$router
->
bind
(
'tag__tag'
,
function
(
$id
)
{
return
app
(
\Modules\Tag\Repositories\TagRepository
::
class
)
->
find
(
$id
);
});
$router
->
get
(
'tags'
,
[
$router
->
get
(
'tags'
,
[
'as'
=>
'admin.tag.tag.index'
,
'as'
=>
'admin.tag.tag.index'
,
'uses'
=>
'TagController@index'
,
'uses'
=>
'TagController@index'
,
...
...
Modules/Tag/Providers/TagServiceProvider.php
View file @
a86e2688
...
@@ -46,6 +46,10 @@ class TagServiceProvider extends ServiceProvider
...
@@ -46,6 +46,10 @@ class TagServiceProvider extends ServiceProvider
$this
->
app
[
'events'
]
->
listen
(
LoadingBackendTranslations
::
class
,
function
(
LoadingBackendTranslations
$event
)
{
$this
->
app
[
'events'
]
->
listen
(
LoadingBackendTranslations
::
class
,
function
(
LoadingBackendTranslations
$event
)
{
$event
->
load
(
'tags'
,
array_dot
(
trans
(
'tag::tags'
)));
$event
->
load
(
'tags'
,
array_dot
(
trans
(
'tag::tags'
)));
});
});
app
(
'router'
)
->
bind
(
'tag__tag'
,
function
(
$id
)
{
return
app
(
TagRepository
::
class
)
->
find
(
$id
);
});
}
}
public
function
boot
()
public
function
boot
()
...
...
Modules/Translation/Http/backendRoutes.php
View file @
a86e2688
...
@@ -4,9 +4,6 @@ use Illuminate\Routing\Router;
...
@@ -4,9 +4,6 @@ use Illuminate\Routing\Router;
/** @var Router $router */
/** @var Router $router */
$router
->
group
([
'prefix'
=>
'/translation'
],
function
(
Router
$router
)
{
$router
->
group
([
'prefix'
=>
'/translation'
],
function
(
Router
$router
)
{
$router
->
bind
(
'translations'
,
function
(
$id
)
{
return
\Modules\Translation\Entities\TranslationTranslation
::
find
(
$id
);
});
$router
->
get
(
'translations'
,
[
$router
->
get
(
'translations'
,
[
'uses'
=>
'TranslationController@index'
,
'uses'
=>
'TranslationController@index'
,
'as'
=>
'admin.translation.translation.index'
,
'as'
=>
'admin.translation.translation.index'
,
...
...
Modules/Translation/Providers/TranslationServiceProvider.php
View file @
a86e2688
...
@@ -12,6 +12,7 @@ use Modules\Core\Traits\CanGetSidebarClassForModule;
...
@@ -12,6 +12,7 @@ use Modules\Core\Traits\CanGetSidebarClassForModule;
use
Modules\Core\Traits\CanPublishConfiguration
;
use
Modules\Core\Traits\CanPublishConfiguration
;
use
Modules\Translation\Console\BuildTranslationsCacheCommand
;
use
Modules\Translation\Console\BuildTranslationsCacheCommand
;
use
Modules\Translation\Entities\Translation
;
use
Modules\Translation\Entities\Translation
;
use
Modules\Translation\Entities\TranslationTranslation
;
use
Modules\Translation\Events\Handlers\RegisterTranslationSidebar
;
use
Modules\Translation\Events\Handlers\RegisterTranslationSidebar
;
use
Modules\Translation\Repositories\Cache\CacheTranslationDecorator
;
use
Modules\Translation\Repositories\Cache\CacheTranslationDecorator
;
use
Modules\Translation\Repositories\Eloquent\EloquentTranslationRepository
;
use
Modules\Translation\Repositories\Eloquent\EloquentTranslationRepository
;
...
@@ -50,6 +51,10 @@ class TranslationServiceProvider extends ServiceProvider
...
@@ -50,6 +51,10 @@ class TranslationServiceProvider extends ServiceProvider
$this
->
app
[
'events'
]
->
listen
(
LoadingBackendTranslations
::
class
,
function
(
LoadingBackendTranslations
$event
)
{
$this
->
app
[
'events'
]
->
listen
(
LoadingBackendTranslations
::
class
,
function
(
LoadingBackendTranslations
$event
)
{
$event
->
load
(
'translations'
,
array_dot
(
trans
(
'translation::translations'
)));
$event
->
load
(
'translations'
,
array_dot
(
trans
(
'translation::translations'
)));
});
});
app
(
'router'
)
->
bind
(
'translations'
,
function
(
$id
)
{
return
TranslationTranslation
::
find
(
$id
);
});
}
}
public
function
boot
()
public
function
boot
()
...
...
Modules/User/Http/apiRoutes.php
View file @
a86e2688
...
@@ -5,9 +5,6 @@ use Illuminate\Routing\Router;
...
@@ -5,9 +5,6 @@ use Illuminate\Routing\Router;
/** @var Router $router */
/** @var Router $router */
$router
->
group
([
'prefix'
=>
'/user'
,
'middleware'
=>
[
'api.token'
,
'auth.admin'
]],
function
(
Router
$router
)
{
$router
->
group
([
'prefix'
=>
'/user'
,
'middleware'
=>
[
'api.token'
,
'auth.admin'
]],
function
(
Router
$router
)
{
$router
->
group
([
'prefix'
=>
'roles'
],
function
(
Router
$router
)
{
$router
->
group
([
'prefix'
=>
'roles'
],
function
(
Router
$router
)
{
$router
->
bind
(
'role'
,
function
(
$id
)
{
return
app
(
\Modules\User\Repositories\RoleRepository
::
class
)
->
find
(
$id
);
});
$router
->
get
(
'/'
,
[
$router
->
get
(
'/'
,
[
'as'
=>
'api.user.role.index'
,
'as'
=>
'api.user.role.index'
,
'uses'
=>
'RoleController@index'
,
'uses'
=>
'RoleController@index'
,
...
@@ -46,9 +43,6 @@ $router->group(['prefix' => '/user', 'middleware' => ['api.token', 'auth.admin']
...
@@ -46,9 +43,6 @@ $router->group(['prefix' => '/user', 'middleware' => ['api.token', 'auth.admin']
});
});
$router
->
group
([
'prefix'
=>
'users'
],
function
(
Router
$router
)
{
$router
->
group
([
'prefix'
=>
'users'
],
function
(
Router
$router
)
{
$router
->
bind
(
'user'
,
function
(
$id
)
{
return
app
(
\Modules\User\Repositories\UserRepository
::
class
)
->
find
(
$id
);
});
$router
->
get
(
'/'
,
[
$router
->
get
(
'/'
,
[
'as'
=>
'api.user.user.index'
,
'as'
=>
'api.user.user.index'
,
'uses'
=>
'UserController@index'
,
'uses'
=>
'UserController@index'
,
...
@@ -96,10 +90,6 @@ $router->group(['prefix' => '/user', 'middleware' => ['api.token', 'auth.admin']
...
@@ -96,10 +90,6 @@ $router->group(['prefix' => '/user', 'middleware' => ['api.token', 'auth.admin']
'uses'
=>
'ProfileController@update'
,
'uses'
=>
'ProfileController@update'
,
]);
]);
$router
->
bind
(
'userTokenId'
,
function
(
$id
)
{
return
app
(
\Modules\User\Repositories\UserTokenRepository
::
class
)
->
find
(
$id
);
});
$router
->
get
(
'api-keys'
,
[
$router
->
get
(
'api-keys'
,
[
'as'
=>
'api.account.api.index'
,
'as'
=>
'api.account.api.index'
,
'uses'
=>
'ApiKeysController@index'
,
'uses'
=>
'ApiKeysController@index'
,
...
...
Modules/User/Http/backendRoutes.php
View file @
a86e2688
...
@@ -81,9 +81,6 @@ $router->group(['prefix' => '/account'], function (Router $router) {
...
@@ -81,9 +81,6 @@ $router->group(['prefix' => '/account'], function (Router $router) {
'as'
=>
'admin.account.profile.update'
,
'as'
=>
'admin.account.profile.update'
,
'uses'
=>
'Account\ProfileController@update'
,
'uses'
=>
'Account\ProfileController@update'
,
]);
]);
$router
->
bind
(
'userTokenId'
,
function
(
$id
)
{
return
app
(
\Modules\User\Repositories\UserTokenRepository
::
class
)
->
find
(
$id
);
});
$router
->
get
(
'api-keys'
,
[
$router
->
get
(
'api-keys'
,
[
'as'
=>
'admin.account.api.index'
,
'as'
=>
'admin.account.api.index'
,
'uses'
=>
'Account\ApiKeysController@index'
,
'uses'
=>
'Account\ApiKeysController@index'
,
...
...
Modules/User/Providers/UserServiceProvider.php
View file @
a86e2688
...
@@ -77,6 +77,16 @@ class UserServiceProvider extends ServiceProvider
...
@@ -77,6 +77,16 @@ class UserServiceProvider extends ServiceProvider
GrantModulePermissionsCommand
::
class
,
GrantModulePermissionsCommand
::
class
,
RemoveModulePermissionsCommand
::
class
,
RemoveModulePermissionsCommand
::
class
,
]);
]);
app
(
'router'
)
->
bind
(
'role'
,
function
(
$id
)
{
return
app
(
RoleRepository
::
class
)
->
find
(
$id
);
});
app
(
'router'
)
->
bind
(
'user'
,
function
(
$id
)
{
return
app
(
UserRepository
::
class
)
->
find
(
$id
);
});
app
(
'router'
)
->
bind
(
'userTokenId'
,
function
(
$id
)
{
return
app
(
UserTokenRepository
::
class
)
->
find
(
$id
);
});
}
}
/**
/**
...
...
Modules/Workshop/Http/backendRoutes.php
View file @
a86e2688
...
@@ -3,13 +3,6 @@
...
@@ -3,13 +3,6 @@
use
Illuminate\Routing\Router
;
use
Illuminate\Routing\Router
;
/** @var Router $router */
/** @var Router $router */
$router
->
bind
(
'module'
,
function
(
$module
)
{
return
app
(
\Nwidart\Modules\Contracts\RepositoryInterface
::
class
)
->
find
(
$module
);
});
$router
->
bind
(
'theme'
,
function
(
$theme
)
{
return
app
(
\Modules\Workshop\Manager\ThemeManager
::
class
)
->
find
(
$theme
);
});
$router
->
group
(
$router
->
group
(
[
'prefix'
=>
'/workshop'
],
[
'prefix'
=>
'/workshop'
],
function
(
Router
$router
)
{
function
(
Router
$router
)
{
...
...
Modules/Workshop/Providers/WorkshopServiceProvider.php
View file @
a86e2688
...
@@ -21,6 +21,7 @@ use Modules\Workshop\Scaffold\Module\Generators\ValueObjectGenerator;
...
@@ -21,6 +21,7 @@ use Modules\Workshop\Scaffold\Module\Generators\ValueObjectGenerator;
use
Modules\Workshop\Scaffold\Module\ModuleScaffold
;
use
Modules\Workshop\Scaffold\Module\ModuleScaffold
;
use
Modules\Workshop\Scaffold\Theme\ThemeGeneratorFactory
;
use
Modules\Workshop\Scaffold\Theme\ThemeGeneratorFactory
;
use
Modules\Workshop\Scaffold\Theme\ThemeScaffold
;
use
Modules\Workshop\Scaffold\Theme\ThemeScaffold
;
use
Nwidart\Modules\Repository
;
class
WorkshopServiceProvider
extends
ServiceProvider
class
WorkshopServiceProvider
extends
ServiceProvider
{
{
...
@@ -52,6 +53,13 @@ class WorkshopServiceProvider extends ServiceProvider
...
@@ -52,6 +53,13 @@ class WorkshopServiceProvider extends ServiceProvider
$event
->
load
(
'modules'
,
array_dot
(
trans
(
'workshop::modules'
)));
$event
->
load
(
'modules'
,
array_dot
(
trans
(
'workshop::modules'
)));
$event
->
load
(
'themes'
,
array_dot
(
trans
(
'workshop::themes'
)));
$event
->
load
(
'themes'
,
array_dot
(
trans
(
'workshop::themes'
)));
});
});
app
(
'router'
)
->
bind
(
'module'
,
function
(
$module
)
{
return
app
(
Repository
::
class
)
->
find
(
$module
);
});
app
(
'router'
)
->
bind
(
'theme'
,
function
(
$theme
)
{
return
app
(
ThemeManager
::
class
)
->
find
(
$theme
);
});
}
}
public
function
boot
()
public
function
boot
()
...
...
config/asgard/core/core.php
View file @
a86e2688
...
@@ -172,4 +172,11 @@ return [
...
@@ -172,4 +172,11 @@ return [
| useViewNamespaces.backend-theme needs to be enabled at module level
| useViewNamespaces.backend-theme needs to be enabled at module level
*/
*/
'enable-theme-overrides'
=>
false
,
'enable-theme-overrides'
=>
false
,
/*
|--------------------------------------------------------------------------
| Check if asgard was installed
|--------------------------------------------------------------------------
*/
'is_installed'
=>
env
(
'INSTALLED'
,
false
)
];
];
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment