Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

View Make Command #12939

Closed
wants to merge 1 commit into from
Closed

View Make Command #12939

wants to merge 1 commit into from

Conversation

ahmedash95
Copy link
Contributor

artisan has a lot of generator commands for controller,model,events,jobs but i actually don't know why there is no make:view command . i didn't find any reason of why not implement it . so i made a small command that generate views with some options

1 - create a plain view

php artisan make:view dashboard.posts.create

that's create a plain view file

2 - create view with blade extends

php artisan make:view dashboard.posts.create --extends="dashboard.layout"

if we want to use section with extends

3 - create view with blade extends with section

php artisan make:view dashboard.posts.create --extends="dashboard.layout" --section="content"

it's just a suggestion .

Regards :)

@taylorotwell
Copy link
Member

Going to hold off on this.

@browner12
Copy link
Contributor

IMO this is overkill, especially the view.plain.stub. If you're using an IDE like phpStorm, just make a live template for your views. It works very well for me, and I imagine it would suit your needs as well.

@ahmedash95
Copy link
Contributor Author

@browner12 it's just a view generator so i tried to make it easy and cover most cases for fast generation . i usually use snippets with my editor " sublime " but when you creating file in sublime you have to create a new empty tab then press ctrl+s and choose the path then write file name + '.blade.php'

but with this command you can create it with just one line , at the end it's just suggestion dude .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants