simple, helpful and easy to use, thank you very much..
Very cool and very helpful, thanks for sharing
Nice!!! Any chance to package this to composer?
Very helpful!
In the edit view, I think it might be better to use Form::model method. http://laravel.com/docs/html#form-model-binding
I would like to suggest you some implement that will cover better Html helper.
Types (optional) = Field tables name + ":" + type of field
Example with table fields: username, password:password, email:email
result:
{{ Form::label('username', 'Username') }}
{{ Form::text('username', @$user->username) }}
{{ Form::label('email', 'Email') }}
{{ Form::email('email', @$user->email) }}
{{ Form::label('password', 'Password') }}
{{ Form::password('password', @$user->password) }}
See full list of Types from here
Hey Guys,
Thank you all for the kind comments, I appreciate that a lot!
@Luddinus: I rather not use model binding in the forms, since I believe it does not work well with relations. This way it is easier to add any number of models using form field arrays.
@NeiPCs: Thanks, not sure if I'll ever do this for composer. But I have taken your comments on field types and implemented some of them.
There have been hundreds of hits to the app., so thanks to everyone who has checked it out!
Please, if anyone has a feature request, finds bugs or whatever, let me know here, I'll do my best to add/fix it, thanks again!
Wowwww you're so fast!
Thanks bro, I'll use it a lot to make my life so easy :)
P.S. What assets package you use in yours Laravel projects who have Bootstrap and some minification of css and js as well?
@NeiPCs: Thanks man! :) I didn't quite get your last question :S What do you mean, like Bower, grunt or something?
I wrote the label for each property, so i can use it for my create/edit form and administrator table.such like this :
user.php
public function i18n {
return array(
"username"=>"用户名",
"password"=>"密码"
);
}
so when i generate a create form , i can simple use this
$user->genTextField('username');
$user->genPasswordField('passwprd');
$user->genTextField('email');
it can generate the label automatic (i can get the i18n information for each db field). it can generate the text field (or password field) for username/email.
and , i can generate the text field( or password field) with a default value in edit method .
BUT it looks ugly because it use $model->generateHTML instead of $View->generateHTML .
--sorry for my pool english
@qufo: I didn't undestand your question (or comment?) very well, but from what I get, this tool is not intended for that sort of use, I mean, it does not (and will not) provide that level of customization. There will always be some manual work you need to do to get it the way you want.
This just provides a starting point, for some might be small tweaks, for others, like you, lots of work.
Having said that, I want to thank you for taking the time to try it out!
:)
Nice work, can I suggest two routes, one for edit and one for create? Or did I miss something?
frocco said:
Nice work, can I suggest two routes, one for edit and one for create? Or did I miss something?
Yeah, i think you missed something :) that is the idea of it.
@rafahoiro Thanks!!
@makzumi Awesome work!
How about generating an index.blade.php in a simple bootstrap table.....I think that would complete the package. :)
@chiraggude: Thanks a lot! glad it worked for you! There are some new features in the works and adding an index might be one of them. Thanks again!!
I've gotten emails requesting some other features (support for zurb foundation, form layout options ,etc...)
I might convert it to a composer package, I wasn't going to, but I've gotten several requests for that, so I'm looking into how to do that, for a future release... Online and composer version, who knows...
One new feature, that i think will help, is support for Relations, I think a lot of people use forms with combined models, so, generating that would help a lot.
We'll see what happens :)
@makzumi Sounds great! Looking forward to seeing more functionality in Laragen.
I am assuming Laragen is one of your side-projects, so in case you need some contributions to do the index view, foundation integration etc. Then give me a shout, I would be happy contribute. :)
The way I see it, the online version itself would be a great addition to the Laravel community if we keep adding features to it. People could then use Laragen and Jeffrey Way's generator to kickstart their Laravel projects.
{{ Form::open(['url' => 'contacts/create, 'method' =>'post', 'class'=>'form', 'role'=>'form']) }}
Notice the fact that there is ' missing after contacts/create. I am not sure if this is a bug or just came in my case, but you can have a look.
Great help btw.
Thanks
Request-URI Too Large
The requested URL's length exceeds the capacity limit for this server.
This is happening when I try to download this. My fields were too many so maybe this created the problem.
Also all the variables are coming with @ before them. You can look into this as well.
why are you using a edit and a create page with the same form? can you do something like this:
@if ( isset($section) )
{{ Form::open(array('url' => URL::action('SectionsController@update', [$$section->id] ), 'method' => 'PUT')) }}
@else
{{ Form::open(array('url' => URL::action('SectionsController@store'), 'method' => 'POST')) }}
@endif
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community