artisan-view
artisan-view copied to clipboard
New feature create views from Stub files
Hello
i want recommend add new feature for excellent Artisan-View
create views from Stub files generate
for example normally is same data only change few parameters inside of each file
i see this project https://medium.com/@devlob/laravel-crud-generators-614caddf8bea
i think can be done same way from Artisan-View for add it
$model $url $route
_form.stub
create.stub
edit.stub
index.stub
show.stub
div> @include('brands._form',[ 'url'=>route('brands.show',$model->id), 'readonly'=>true, ])
Thanks
Best Regard
fjmpchato
Hi @fjmpchato, thanks for the suggestion! However, I feel like this is a bit too "heavy" of a feature for artisan-view. There's already an open issue that describes something similar; the idea of "presets".
So you might configure a new preset:
// config/views.php
return [
// ...
'presets' => [
'crud' => [
'extends' => 'layouts.master',
'sections' => ['title:', 'body'],
],
],
];
... which you could then use like so: php artisan make:view posts.create --preset=crud
. This is not implemented yet, as I've been rather busy with other stuff. But would that feature help you in any way? 🙂
Hi @fjmpchato, thanks for the suggestion! However, I feel like this is a bit too "heavy" of a feature for artisan-view. There's already an open issue that describes something similar; the idea of "presets".
So you might configure a new preset:
// config/views.php return [ // ... 'presets' => [ 'crud' => [ 'extends' => 'layouts.master', 'sections' => ['title:', 'body'], ], ], ];
... which you could then use like so:
php artisan make:view posts.create --preset=crud
. This is not implemented yet, as I've been rather busy with other stuff. But would that feature help you in any way? 🙂
Sir has this feature been added yet? If yes, can we extend any layout specially the ones containing HTML content in them?
This package has been abandoned because of the introduction of the new make:view
command included in Laravel since v10.23.0. For that reason, this issue will not be worked on.