File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 3
3
namespace InfyOm \Generator \Commands \Publish ;
4
4
5
5
use Exception ;
6
+ use Illuminate \View \Factory ;
6
7
use Symfony \Component \Console \Input \InputArgument ;
7
8
8
9
class PublishTablesCommand extends PublishBaseCommand
@@ -45,13 +46,16 @@ public function publishLivewireTableViews()
45
46
$ viewsPath = config ('laravel_generator.path.views ' , resource_path ('views/ ' ));
46
47
$ templateType = config ('infyom.laravel_generator.templates ' , 'adminlte-templates ' );
47
48
$ files = [
48
- 'scaffold.table.livewire.actions ' => 'common/livewire-tables/actions.blade.php ' ,
49
+ 'templates. scaffold.table.livewire.actions ' => 'common/livewire-tables/actions.blade.php ' ,
49
50
];
50
51
51
52
g_filesystem ()->createDirectoryIfNotExist ($ viewsPath .'common/livewire-tables ' );
52
53
54
+ /** @var Factory $viewFactory */
55
+ $ viewFactory = view ();
53
56
foreach ($ files as $ templateView => $ destinationView ) {
54
- $ content = view ($ templateType .':: ' .$ templateView );
57
+ $ templateViewPath = $ viewFactory ->getFinder ()->find ($ templateType .':: ' .$ templateView );
58
+ $ content = g_filesystem ()->getFile ($ templateViewPath );
55
59
$ destinationFile = $ viewsPath .$ destinationView ;
56
60
g_filesystem ()->createFile ($ destinationFile , $ content );
57
61
}
You can’t perform that action at this time.
0 commit comments