From a51c1491dcd22af61cc928f5ebc9055f838491ea Mon Sep 17 00:00:00 2001 From: amazing-username Date: Mon, 29 May 2017 21:19:33 -0500 Subject: [PATCH] added style stuff --- app/Http/Controllers/BillController.php | 15 ++-- resources/views/createbill.blade.php | 16 ++-- resources/views/home.blade.php | 3 +- resources/views/login.blade.php | 21 +++-- resources/views/manage.blade.php | 111 ++++++++++++++++++++---- resources/views/register.blade.php | 47 ++++++---- resources/views/userhome.blade.php | 8 +- resources/views/view.blade.php | 53 ++++++++++- 8 files changed, 209 insertions(+), 65 deletions(-) diff --git a/app/Http/Controllers/BillController.php b/app/Http/Controllers/BillController.php index de106f3..6e9e659 100644 --- a/app/Http/Controllers/BillController.php +++ b/app/Http/Controllers/BillController.php @@ -82,7 +82,6 @@ class BillController extends Controller $cost = DB::table('transactions')->where('responsible', $id)->pluck('cost')->first(); $people = DB::table('transactions')->where('responsible', $id)->pluck('people')->first(); $full = ($cost * 100) / ($people * 100); - $full = $full . ""; echo $id . $billname . $payer . $amountpaid . $full . $username; DB::table('responsible')->insert( ['id' => $id, 'billname' => $billname, 'username' => $payer, 'amountpaid' => $amountpaid, 'total' => $full, 'owner' => $username] @@ -106,7 +105,7 @@ class BillController extends Controller } } - return view('manage', ['username' => $username, 'message' => $payer . " has been added to the bill"])->with('test', $test)->with('users', $users)->with('payer', '')->with('bills', '')->with('amountpaids', '')->with('totals', '')->with('responsibleid', $responsibleid)->with('count', $count); + return view('manage', ['username' => $username, 'message' => $payer . " has been added to the bill"])->with('test', $test)->with('users', $users)->with('payer', '')->with('bills', '')->with('amountpaids', $amountpaids)->with('totals', '')->with('responsibleid', $responsibleid)->with('count', ''); } public function calcbill(Request $stuff) { @@ -119,7 +118,8 @@ class BillController extends Controller $responsibleid = DB::table('responsible')->where('owner', $stuff->input('username'))->pluck('id'); $count = $amountpaids->count(); - DB::table('responsible')->where('id', $responsibleid)->update(['amountpaid' => $stuff->input('amountpaid')]); + DB::table('responsible')->where('id', $stuff->input('responsibleid'))->update(['amountpaid' => $stuff->input('amountpaid')]); + echo $stuff->input('amountpaid') . "
"; return view('manage', ['username' => $stuff->input('username'), 'message' => ''])->with('test', $test)->with('users', $users)->with('payer', $payer)->with('bills', $bills)->with('amountpaids', $amountpaids)->with('totals', $totals)->with('responsibleid', $responsibleid)->with('count', $count); } @@ -141,17 +141,20 @@ class BillController extends Controller public function view(Request $stuff) { $grass = DB::table('bills')->pluck('billname'); - return view('view', ['username' => $stuff->input('username')])->with('grass', $grass); + return view('view', ['username' => $stuff->input('username')])->with('grass', $grass)->with('billname', '')->with('owner', '')->with('amountpaid', '')->with('total', ''); } public function viewbill(Request $stuff) { $grass = DB::table('bills')->pluck('billname'); $billchoice = $stuff->input('tough'); - $bills = DB::table('responsible')->where('billname', $billchoice)->orderBy('id', 'desc'); + $owner = DB::table('responsible')->orderBy('id', 'desc')->where('username', $stuff->input('username'))->pluck('owner')->first(); + $amountpaid = DB::table('responsible')->orderBy('id', 'desc')->where('username', $stuff->input('username'))->pluck('amountpaid')->first(); + $total = DB::table('responsible')->orderBy('id', 'desc')->where('username', $stuff->input('username'))->pluck('total')->first(); + echo "Hey " . $stuff->input('username') . " you chose: "; echo $stuff->input('tough'); echo "
"; - return "Yup"; + return view('view', ['username' => $stuff->input('username')])->with('grass', $grass)->with('billname', $billchoice)->with('owner', $owner)->with('amountpaid', $amountpaid)->with('total', $total); } } diff --git a/resources/views/createbill.blade.php b/resources/views/createbill.blade.php index d47e415..c11f8cb 100644 --- a/resources/views/createbill.blade.php +++ b/resources/views/createbill.blade.php @@ -12,26 +12,28 @@ -
-

Alright {{ $username }}, here is where you can create bills

{!! Form::open(array('action' => 'HomeController@home')) !!} - {{ Form::hidden('username', $username) }}

- {{ Form::button('userHome', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }} +

+ {{ Form::button('user home', array('style' => 'height:15%;width:100%;font-size:500%;background-color:#000000;color:#eee', 'type' => 'submit')) }} +

{!! Form::close() !!} +
+

Alright {{ $username }}, here is where you can create bills

+
{!! Form::open(array('action' => 'BillController@createbill')) !!} {{ Form::hidden('username', $username) }}

- {{ Form::label('lbl', 'bill name', array('style' => 'font-size:400%')) }} + {{ Form::label('lbl', 'bill name', array('style' => 'font-size:500%')) }}

- {{ Form::text('billname', '', array('style' => 'font-size:400%')) }} + {{ Form::text('billname', '', array('style' => 'width:70%;height:15%;font-size:500%')) }}

- {{ Form::button('Create Bill', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }} + {{ Form::button('Create Bill', array('style' => 'height:20%;width:70%;font-size:500%', 'type' => 'submit')) }}

{!! Form::close() !!}

{{$message}}

diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index 4e14517..532b569 100644 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -15,7 +15,8 @@

HomeIsWhereTheMoneyIs


- +

+
diff --git a/resources/views/login.blade.php b/resources/views/login.blade.php index 3c67ef7..65db936 100644 --- a/resources/views/login.blade.php +++ b/resources/views/login.blade.php @@ -12,21 +12,26 @@ +
+

Home

+
-

Login Page

-

Home

- +

Login Page

+
{{ Form::open(array('action' => 'HomeController@loginUser')) }}

- {{ Form::label("username") }} - {{ Form::text("username") }} + {{ Form::label("usernamelabel", 'username', array('style' => 'width:50%;height:20%;font-size:500%')) }} +
+ {{ Form::text("username", '', array('style' => 'width:70%;height:15%;font-size:500%')) }}

- {{ Form::label("password") }} - {{ Form::password("password") }} + {{ Form::label("passwordlabel", 'password', array('style' => 'width:50%;height:20%;font-size:500%')) }} +
+ {{ Form::password("password", array('style' => 'width:70%;height:15%;font-size:500%')) }}

- {{ Form::submit("Login maxipad resident") }} +
+ {{ Form::submit("Login", array('style' => 'width:70%;height:25%;font-size:500%')) }}

{{ Form::close() }}

{{ $message }}

diff --git a/resources/views/manage.blade.php b/resources/views/manage.blade.php index 23631b9..f137c9c 100644 --- a/resources/views/manage.blade.php +++ b/resources/views/manage.blade.php @@ -9,38 +9,80 @@ + -
-

Alright {{ $username }}, here is where you can manage the bills you own bills

{!! Form::open(array('action' => 'HomeController@home')) !!} {{ Form::hidden('username', $username) }}

- {{ Form::button('user Home', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }} +

+ {{ Form::button('user home', array('style' => 'height:15%;width:100%;font-size:500%;background-color:#000000;color:#eee', 'type' => 'submit')) }} +

{!! Form::close() !!} +
+

Alright {{ $username }}, here is where you can manage the bills you own bills

+

{!! Form::open(array('action' => 'BillController@managebill')) !!} {{ Form::hidden('username', $username) }} - @foreach ($test as $bax) @endforeach -

- {{ Form::label('datelabel', "enter in yyyymm") }} - {{ Form::text('date') }}

- {{ Form::label('totallabel', 'total bill amount') }} - {{ Form::text('total') }} + {{ Form::label('datelabel', "enter date in yyyymm", array('style' => 'font-size:500%')) }}

- {{ Form::label('eachlabel', 'each bill amount') }} - {{ Form::text('each') }} + {{ Form::text('date', '', array('style' => 'width:70%;height:15%;font-size:500%')) }}

- {{ Form::button('Create Bill', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }} +

+ {{ Form::label('totallabel', 'total bill amount', array('style' => 'font-size:500%')) }} +

+

+ {{ Form::text('total', '', array('style' => 'width:70%;height:15%;font-size:500%')) }} +

+

+ {{ Form::label('eachlabel', 'how many people', array('style' => 'font-size:500%')) }} +

+

+ {{ Form::text('each', '', array('style' => 'width:70%;height:15%;font-size:500%')) }} +

+ {{ Form::button('add bill', array('style' => 'height:30%;width:70%;font-size:500%', 'type' => 'submit')) }}

{!! Form::close() !!}

{{ $message }}

@@ -51,12 +93,18 @@ {!! Form::open(array('action' => 'BillController@addpeople')) !!} {{ Form::hidden('username', $username) }}

- @foreach ($test as $bax) @endforeach

+

+ {{ Form::label('payerlbl', 'payer') }} +

@foreach ($test as $bax) @@ -90,6 +145,9 @@ @endforeach

+

+ {{ Form::label('payerlbl', 'payer') }} +

+

+ {{ Form::label('idlbl', 'bill id') }} +

@foreach ($users as $cax) @@ -134,9 +200,22 @@ nothing @endif @if ($empt) + + + + + + + @for ($i = 0; $i < $count; ++$i) - {{ $payer }} {{ $bills[$i] }} {{ $amountpaids[$i] }} {{ $totals[$i] }}
+ + + + + + @endfor +
PayerBillnameAmount paidTotal
{{ $payer }}{{ $bills[$i] }}{{ $amountpaids[$i] }}{{ $totals[$i] }}
@endif

diff --git a/resources/views/register.blade.php b/resources/views/register.blade.php index eae979d..e2e497a 100644 --- a/resources/views/register.blade.php +++ b/resources/views/register.blade.php @@ -12,40 +12,49 @@ +
+

Home

+
-

Registration Page

-

Home

- +

Registration Page

+
{{ Form::open(array('action' => 'HomeController@registerUser', 'method' => 'post')) }}

- {{ Form::label('first name') }} - {{ Form::text('firstname') }} + {{ Form::label('firstnamelabel', 'first name', array('style' => 'width:60%;height:20%;font-size:500%')) }} +
+ {{ Form::text('firstname', '', array('style' => 'width:70%;height:15%;font-size:500%')) }}

- {{ Form::label('last name') }} - {{ Form::text('lastname') }} + {{ Form::label('lastnamelabel', 'last name', array('style' => 'width:60%;height:20%;font-size:500%')) }} +
+ {{ Form::text('lastname', '', array('style' => 'width:70%;height:15%;font-size:500%')) }}

- {{ Form::label('username') }} - {{ Form::text('username') }} + {{ Form::label('usernamelabel', 'username', array('style' => 'width:60%;height:20%;font-size:500%')) }} +
+ {{ Form::text('username', '', array('style' => 'width:70%;height:15%;font-size:500%')) }}

- {{ Form::label('password') }} - {{ Form::password('password') }} + {{ Form::label('passwordlabel', 'password', array('style' => 'width:60%;height:20%;font-size:500%')) }} +
+ {{ Form::password('password', array('style' => 'width:70%;height:15%;font-size:500%')) }}

- {{ Form::label('confirm') }} - {{ Form::password('confirm') }} + {{ Form::label('confirmlabel', 'confirm', array('style' => 'width:60%;height:20%;font-size:500%')) }} +
+ {{ Form::password('confirm', array('style' => 'width:70%;height:15%;font-size:500%')) }}

- {{ Form::label('roomlabel') }} - {{ Form::select('room', array('single' => 'single', 'double' => 'double')) }} + {{ Form::label('roomlabel', 'room', array('style' => 'width:60%;height:20%;font-size:500%')) }} +
+

- {{ Form::submit('register me') }} +
+ {{ Form::submit('register me', array('style' => 'width:70%;height:25%;font-size:500%')) }}

{{ Form::close() }}

{{ $message }}

diff --git a/resources/views/userhome.blade.php b/resources/views/userhome.blade.php index 900fa34..31e8f6b 100644 --- a/resources/views/userhome.blade.php +++ b/resources/views/userhome.blade.php @@ -22,26 +22,26 @@ height: 30%;

What's good {{$username}}? it's your home page

-
+

{!! Form::open(array('action' => 'BillController@create')) !!} {{ Form::hidden('username', $username) }}

- {{ Form::button('create', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }} + {{ Form::button('create', array('style' => 'height:30%;width:80%;font-size:800%', 'type' => 'submit')) }}

{!! Form::close() !!} {!! Form::open(array('action' => 'BillController@manage')) !!} {{ Form::hidden('username', $username) }}

- {{ Form::button('mange', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }} + {{ Form::button('mange', array('style' => 'height:30%;width:80%;font-size:800%', 'type' => 'submit')) }}

{!! Form::close() !!} {!! Form::open(array('action' => 'BillController@view')) !!} {{ Form::hidden('username', $username) }}

- {{ Form::button('view', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }} + {{ Form::button('view', array('style' => 'height:30%;width:80%;font-size:800%', 'type' => 'submit')) }}

{!! Form::close() !!}
diff --git a/resources/views/view.blade.php b/resources/views/view.blade.php index f45a5f2..7d2e88d 100644 --- a/resources/views/view.blade.php +++ b/resources/views/view.blade.php @@ -9,17 +9,46 @@ + -
-

Alright {{ $username }}, here is where you can view bills that you need to pay...

{!! Form::open(array('action' => 'HomeController@home')) !!} {{ Form::hidden('username', $username) }}

- {{ Form::button('user Home', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }} +

+ {{ Form::button('user home', array('style' => 'height:15%;width:100%;font-size:500%;background-color:#000000;color:#eee', 'type' => 'submit')) }} +

{!! Form::close() !!} +
+

Alright {{ $username }}, here is where you can view bills that you need to pay...

{!! Form::open(array('action' => 'BillController@viewbill')) !!} {{ Form::hidden('username', $username) }} @@ -29,9 +58,25 @@ @endforeach

- {{ Form::button('Create Bill', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }} + {{ Form::button('view bills', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }}

{!! Form::close() !!} +
+ + + + + + + + + + + + + +
bill nameamount paidtotalowner
{{ $billname }}{{ $amountpaid }}{{ $total }}{{ $owner }}
+