Have a look at the commands prefixed with make: - they're what you're after :)
Laravel 5 Generators
Hello,
The repo of Laravel-4-Generators there is a note about L5-support: "There is no support for Laravel 5, as the framework now includes a number of generators out of the box."
But what's true about that? Didn't find that generators.
I use Scaffolding always, because it's easy and fast for fast development of small things.
Who know the reason, or a way to use Scaffold.
@rene I know what you mean, @JeffreyWay's generators were a real time save. @deringer, in renews question, scaffold was one command compared with many if you were to do them individually.
Laravel is very separation-of-concerns friendly. You could probably put a small script together that runs all the relevant make commands for you. I didn't use scaffold myself, but I can maybe put something together in a bit after I've had a look at the functionality.
I honestly never used the scaffolding generator. It's cool for party tricks, but that's about it. :)
The only thing I miss is the schema generator from generate:migration. I'm hoping to submit a PR to add that functionality in.
@JeffreyWay would you consider updating your generators package. There is some really useful stuff in there.
@mstnorris - What, specifically, are you missing from that package?
I would love to get back seed, pivot, resource and scaffold. I know they're fairly basic but they are time savers and great for getting the little things done.
Maybe I'm missing this in the docs/help command somewhere but does generate:controller not have a --path anymore? I used that a lot with L4 Generators since I had folders in the controllers folder...
indeed @mstnorris. @jeffreyway, i always used generate:scaffold, and always told the console yes for each option. So I had a restful controller, including a migration and seed file. and also the views, where i pasted in my own always-the-same-structure :P
@bashy it seems everything is relative to app/Http/Controllers in L5.
> php artisan make:controller Bashy\\Controller
> vim app/Http/Controllers/Bashy/BashyController.php
@deringer Thanks for checking that! That's helpful, surprised I didn't think of it myself... so simple. Also creates the namespace, great!
@JeffreyWay its possible to get make:seed ?
I miss the pivot command myself. Also when generate:migration without having to add --create cause I'm lazy.
@jekinney I'm with you on the pivot and because of my ADD end up screwing up the pivot relations.
@JeffreyWay i use scaffold generators on my last 10 projects, yes they was all small, but with scaffold i finish them really quickly. Can you please update you generators or make separate package only for scaffolding !
I think scaffold is one of the best package out there. It create everything i need, i just make little adjustment after that and i am done !
generate:pivot is definitely pretty convenient. Maybe we could offer something, like:
php artisan make:migration:pivot post tag
@JeffreyWay please make it so.
@JeffreyWay It is indeed cool for party tricks and I go to a lot of parties :-) But on a serious note, I do go to a fair number of jams where we put things together in a few hours and that is where I found the scaffold generator an invaluable tool, (well, I did use dollar :-( ). within a couple of minutes I had something presentable. I suppose I could continue using Laravel 4 for jams, but then I would miss the cool features of 5.
@JeffreyWay will migrate:pivot be available soonish?
From Laraveles - Comunidad Hispanoamericana de Laravel we are working on some repositories Github Laraveles . We have some artisan commands working and if you want to test them. Go for it!
Working commands:
-
Make:seed
-
Make:test
Instructions are available within the github repository.
Hope they helps you.
I came here for the party and yeah seed and pivot generators would be nice.
Also passing fields to generate:migration was awesome!
+1 for make:seed
+1 for scaffolding!
I will create a new package based on Laravel-4-Generators to put Laravel make command on steroids.
I really like RoR generators, so I will try to port them into Laravel.
@bashy Controllers in Laravel 5 are name-spaced using the PSR-4 standard, so you can specify the path by specifying the corresponding namespace. For example, $ php artisan make:controller Admin\EventController would create a class at the path of app/Http/Controllers/Admin/EventController.php. Also note you need to escape the back slash.
@martinbean Yeah found that out, thanks.
Forgot how nice the seed was till now.
I had the 1.1 version with scaffold modified to edit related model in retrospective manner now i will have to do it for Laravel 5 but its seems much challenging this time as i don't have much of boiler plates like before generate:view it speed development like lightening speed, I only had to write my scaffold then i had a fully running application right there
I found a scaffold generator for L5 here https://github.com/laralib/l5scaffold
Please or to participate in this conversation.