FEATURE: add blade template registration into templates
This commit is contained in:
@@ -5,6 +5,6 @@ return [
|
||||
'alias' => 'sablona',
|
||||
'description' => 'Sablona jednostrankova',
|
||||
'files' => [
|
||||
'routes.php'
|
||||
__DIR__.'/routes.php'
|
||||
]
|
||||
];
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
Route::group(['middleware' => 'web', 'prefix' => 'test', 'namespace' => 'Modules\Blog\Comments\Http\Controllers'], function()
|
||||
Route::group(['middleware' => 'web', 'prefix' => 'test'], function()
|
||||
{
|
||||
Route::get('/neco-neco', 'CommentsController@index')->name('template.route');
|
||||
Route::get('/', function() {
|
||||
echo "ahoj";
|
||||
})->name('template.route');
|
||||
});
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
namespace Templates\Jednostrankovka;
|
||||
|
||||
use App\Models\Module;
|
||||
use App\Models\User;
|
||||
use Templates\Base\OnePage\Handlers\OnePage;
|
||||
|
||||
class Handler extends OnePage
|
||||
{
|
||||
/**
|
||||
* Register admin menu (or multiple ones)
|
||||
*
|
||||
* This cannot be in ServiceProvider because Session is started at middleware. And ServiceProvider is called before
|
||||
* starting any middleware..
|
||||
*
|
||||
* @param User $user model of logged user
|
||||
*/
|
||||
public static function registerAdminMenu(User $user)
|
||||
{
|
||||
// parent::registerAdminMenu($user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Install module
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public static function install()
|
||||
{
|
||||
// parent::install();
|
||||
}
|
||||
|
||||
public static function uninstall(Module $template)
|
||||
{
|
||||
// parent::uninstall($template);
|
||||
}
|
||||
|
||||
public static function getPublicTemplatePaths()
|
||||
{
|
||||
return [
|
||||
[
|
||||
'module' => 'Article',
|
||||
'templateName' => 'article::templates.name'
|
||||
],
|
||||
[
|
||||
'module' => 'StaticPages',
|
||||
'templateName' => 'staticpages::templates.name'
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{{dd($page)}}
|
||||
@@ -0,0 +1 @@
|
||||
tu nic neni
|
||||
+1
@@ -0,0 +1 @@
|
||||
homepage neni...
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
$config = include_once __DIR__.'/../Base/OnePage/config.php';
|
||||
|
||||
$config['handler'] = \Templates\Jednostrankovka\Handler::class;
|
||||
$config['alias'] = 'jednostrankovka';
|
||||
|
||||
return $config;
|
||||
Reference in New Issue
Block a user