@extends("_master")
@section("title")
Random User Generator
@stop
@section("head")
@stop
@section("content")
Back to main page
Random User Generator
{{ Form::open (array('url' => '/user-generator', 'method' => 'POST')) }}
{{ Form::label('users', 'How many users? ') }}
@if (isset($text))
{{ Form::text('users', $text['users'] ) }}
@else
{{ Form::text('users', '3' ) }}
@endif
@if (isset($text))
{{ Form::label('birthdate', 'Birthdate? ') }}
@if ($text['birthdaySelected'])
{{ Form::checkbox('birthdate', 'birthdate', true ) }}
@else
{{ Form::checkbox('birthdate', 'birthdate' ) }}
@endif
{{ Form::label('profile', 'Profile? ') }}
@if ($text['profileSelected'])
{{ Form::checkbox('profile', 'profile', true ) }}
@else
{{ Form::checkbox('profile', 'profile' ) }}
@endif
@else
{{ Form::label('birthdate', 'Birthdate? ') }}
{{ Form::checkbox('birthdate', 'birthdate' ) }}
{{ Form::label('profile', 'Profile? ') }}
{{ Form::checkbox('profile', 'profile' ) }}
@endif
{{ Form::submit('Generate Users!') }}
@if(isset($text))
Here are your random users:
@for ($i=0; $i < $text['users']; $i++)
-
Name: {{ $faker->name }}
@if ($text['birthdaySelected'])
-
Birthdate: {{ $faker->dateTimeThisCentury->format('m-d-Y') }}
@endif
@if ($text['profileSelected'])
-
{{ $faker->text }}
@endif
@endfor
@endif
{{ Form::close() }}
@stop