Skip to content

Commit

Permalink
block view path changed
Browse files Browse the repository at this point in the history
  • Loading branch information
mjawad096 committed Jun 2, 2021
1 parent e7efbe0 commit 375b546
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/App/Http/Controllers/EditorController.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function templates(Request $request)
$file_name = str_replace(".blade.php", "", $fileInfo->getBasename());
$templates [] = [
'category' => 'Templates',
'id' => $fileInfo->getFilename(),
'id' => 'template-' . $fileInfo->getFilename(),
'label' => Str::title(str_replace(["-"], " ", $file_name)),
'content' => view("grapesjs::templates.{$file_name}")->render()
];
Expand All @@ -61,9 +61,9 @@ public function templates(Request $request)
$file_name = str_replace(".blade.php", "", $fileInfo->getBasename());
$templates [] = [
'category' => 'Blocks',
'id' => $fileInfo->getFilename(),
'id' => 'block-' . $fileInfo->getFilename(),
'label' => Str::title(str_replace(["-"], " ", $file_name)),
'content' => view("grapesjs::templates.{$file_name}")->render()
'content' => view("grapesjs::gjs-blocks.{$file_name}")->render()
];
}

Expand Down
6 changes: 5 additions & 1 deletion src/GrapesjsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ public function publishFiles()

$this->publishes([
__DIR__.'/public' => public_path(),
__DIR__.'/../fonts' => public_path('fonts'),
// __DIR__.'/../fonts' => public_path('fonts'),
], 'public');

$this->publishes([
__DIR__.'/resources/views' => resource_path('views'),
], 'views');
}
}

0 comments on commit 375b546

Please sign in to comment.