Bug where the correct amount paid and total due for a bill was not showing up properly for those viewing bills they belong to
This commit is contained in:
@@ -25,6 +25,7 @@ class BillController extends Controller
|
|||||||
]);
|
]);
|
||||||
return view('createbill', ['username' => $stuff->input('username'), 'message' => 'Bill created']);
|
return view('createbill', ['username' => $stuff->input('username'), 'message' => 'Bill created']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function manage(Request $stuff)
|
public function manage(Request $stuff)
|
||||||
{
|
{
|
||||||
$test = DB::table('bills')->where('username', $stuff->input('username'))->pluck('billname');
|
$test = DB::table('bills')->where('username', $stuff->input('username'))->pluck('billname');
|
||||||
@@ -75,21 +76,8 @@ class BillController extends Controller
|
|||||||
$amountpaids = DB::table('responsible')->where('username', $payer)->pluck('amountpaid');
|
$amountpaids = DB::table('responsible')->where('username', $payer)->pluck('amountpaid');
|
||||||
$responsibleid = DB::table('responsible')->where('owner', $stuff->input('username'))->pluck('id');
|
$responsibleid = DB::table('responsible')->where('owner', $stuff->input('username'))->pluck('id');
|
||||||
$count = $amountpaids->count();
|
$count = $amountpaids->count();
|
||||||
if ($billname !== "Rent" | $billname !== "rent")
|
if ($billname === "Rent" || $billname === "rent")
|
||||||
{
|
{
|
||||||
echo "Not equal" . "<br>";
|
|
||||||
$id = $date . $billname;
|
|
||||||
$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);
|
|
||||||
echo $id . $billname . $payer . $amountpaid . $full . $username;
|
|
||||||
DB::table('responsible')->insert(
|
|
||||||
['id' => $id, 'billname' => $billname, 'username' => $payer, 'amountpaid' => $amountpaid, 'total' => $full, 'owner' => $username]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
echo "It's the rent bill" . "<br>";
|
|
||||||
$id = $date . $billname;
|
$id = $date . $billname;
|
||||||
$cost = DB::table('transactions')->where('responsible', $id)->pluck('cost')->first();
|
$cost = DB::table('transactions')->where('responsible', $id)->pluck('cost')->first();
|
||||||
$roomtype = DB::table('users')->where('username', $payer)->pluck('room')->first();
|
$roomtype = DB::table('users')->where('username', $payer)->pluck('room')->first();
|
||||||
@@ -104,6 +92,16 @@ class BillController extends Controller
|
|||||||
['id' => $id, 'billname' => $billname, 'username' => $payer, 'amountpaid' => $amountpaid, 'total' => '262', 'owner' => $username]);
|
['id' => $id, 'billname' => $billname, 'username' => $payer, 'amountpaid' => $amountpaid, 'total' => '262', 'owner' => $username]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$id = $date . $billname;
|
||||||
|
$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);
|
||||||
|
DB::table('responsible')->insert(
|
||||||
|
['id' => $id, 'billname' => $billname, 'username' => $payer, 'amountpaid' => $amountpaid, 'total' => $full, 'owner' => $username]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
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', '');
|
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', '');
|
||||||
}
|
}
|
||||||
@@ -119,7 +117,6 @@ class BillController extends Controller
|
|||||||
$count = $amountpaids->count();
|
$count = $amountpaids->count();
|
||||||
|
|
||||||
DB::table('responsible')->where('id', $stuff->input('responsibleid'))->update(['amountpaid' => $stuff->input('amountpaid')]);
|
DB::table('responsible')->where('id', $stuff->input('responsibleid'))->update(['amountpaid' => $stuff->input('amountpaid')]);
|
||||||
echo $stuff->input('amountpaid') . "<br>";
|
|
||||||
|
|
||||||
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);
|
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);
|
||||||
}
|
}
|
||||||
@@ -136,23 +133,21 @@ class BillController extends Controller
|
|||||||
|
|
||||||
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);
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function view(Request $stuff)
|
public function view(Request $stuff)
|
||||||
{
|
{
|
||||||
$grass = DB::table('bills')->pluck('billname');
|
$grass = DB::table('bills')->pluck('billname');
|
||||||
return view('view', ['username' => $stuff->input('username')])->with('grass', $grass)->with('billname', '')->with('owner', '')->with('amountpaid', '')->with('total', '');
|
return view('view', ['username' => $stuff->input('username')])->with('grass', $grass)->with('billname', '')->with('owner', '')->with('amountpaid', '')->with('total', '')->with('count', '');
|
||||||
}
|
}
|
||||||
public function viewbill(Request $stuff)
|
public function viewbill(Request $stuff)
|
||||||
{
|
{
|
||||||
$grass = DB::table('bills')->pluck('billname');
|
$grass = DB::table('bills')->pluck('billname');
|
||||||
$billchoice = $stuff->input('tough');
|
$billchoice = $stuff->input('tough');
|
||||||
$owner = DB::table('responsible')->orderBy('id', 'desc')->where('username', $stuff->input('username'))->pluck('owner')->first();
|
$owner = DB::table('responsible')->orderBy('id', 'desc')->where('username', $stuff->input('username'))->where('billname', $billchoice)->pluck('owner');
|
||||||
$amountpaid = DB::table('responsible')->orderBy('id', 'desc')->where('username', $stuff->input('username'))->pluck('amountpaid')->first();
|
$amountpaid = DB::table('responsible')->orderBy('id', 'desc')->where('username', $stuff->input('username'))->where('billname', $billchoice)->pluck('amountpaid');
|
||||||
$total = DB::table('responsible')->orderBy('id', 'desc')->where('username', $stuff->input('username'))->pluck('total')->first();
|
$total = DB::table('responsible')->orderBy('id', 'desc')->where('username', $stuff->input('username'))->where('billname', $billchoice)->pluck('total');
|
||||||
|
$count = DB::table('responsible')->where('username', $stuff->input('username'))->where('billname', $billchoice)->count();
|
||||||
|
|
||||||
echo "Hey " . $stuff->input('username') . " you chose: ";
|
return view('view', ['username' => $stuff->input('username')])->with('grass', $grass)->with('billname', $billchoice)->with('owner', $owner)->with('amountpaid', $amountpaid)->with('total', $total)->with('count', $count);
|
||||||
echo $stuff->input('tough');
|
|
||||||
echo "<br>";
|
|
||||||
|
|
||||||
return view('view', ['username' => $stuff->input('username')])->with('grass', $grass)->with('billname', $billchoice)->with('owner', $owner)->with('amountpaid', $amountpaid)->with('total', $total);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,18 +13,16 @@
|
|||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{!! Form::open(array('action' => 'HomeController@home')) !!}
|
{!! Form::open(array('action' => 'HomeController@home')) !!}
|
||||||
{{ Form::hidden('username', $username) }}
|
{{ Form::hidden('username', $username) }}
|
||||||
<p>
|
<p>
|
||||||
<div>
|
<div>
|
||||||
{{ Form::button('user home', array('class' => 'userhome', 'type' => 'submit')) }}
|
{{ Form::button('user home', array('class' => 'userhome', 'type' => 'submit')) }}
|
||||||
</div>
|
</div>
|
||||||
</p>
|
</p>
|
||||||
{!! Form::close() !!}
|
{!! Form::close() !!}
|
||||||
<div class="jumbotron text-center maincontentarea">
|
<div class="jumbotron text-center maincontentarea">
|
||||||
<h1>Alright {{ $username }}, here is where you can create bills</h1>
|
<h1>Alright {{ $username }}, here is where you can create bills</h1><br>
|
||||||
<br>
|
|
||||||
|
|
||||||
{!! Form::open(array('action' => 'BillController@createbill')) !!}
|
{!! Form::open(array('action' => 'BillController@createbill')) !!}
|
||||||
{{ Form::hidden('username', $username) }}
|
{{ Form::hidden('username', $username) }}
|
||||||
<p>
|
<p>
|
||||||
@@ -34,7 +32,7 @@
|
|||||||
{{ Form::text('billname', '') }}
|
{{ Form::text('billname', '') }}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{ Form::button('Create Bill', array('class' => 'createbill', 'type' => 'submit')) }}
|
{{ Form::button('Create Bill', array('class' => 'createbill', 'type' => 'submit')) }}
|
||||||
</p>
|
</p>
|
||||||
{!! Form::close() !!}
|
{!! Form::close() !!}
|
||||||
<h1>{{$message}}</h1>
|
<h1>{{$message}}</h1>
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>HomeIsWhereTheMoneyIs</title>
|
<title>HomeIsWhereTheMoneyIs</title>
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||||
|
|
||||||
<!-- Optional theme -->
|
<!-- Optional theme -->
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
<!-- Latest compiled and minified JavaScript -->
|
<!-- Latest compiled and minified JavaScript -->
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="http://108.255.70.130/css/scc.css">
|
<link rel="stylesheet" type="text/css" href="http://108.255.70.130/css/scc.css">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -13,56 +13,54 @@
|
|||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{!! Form::open(array('action' => 'HomeController@home')) !!}
|
{!! Form::open(array('action' => 'HomeController@home')) !!}
|
||||||
{{ Form::hidden('username', $username) }}
|
{{ Form::hidden('username', $username) }}
|
||||||
<p>
|
<p>
|
||||||
<div>
|
<div>
|
||||||
{{ Form::button('user home', array('class' => 'userhome', 'type' => 'submit')) }}
|
{{ Form::button('user home', array('class' => 'userhome', 'type' => 'submit')) }}
|
||||||
</div>
|
</div>
|
||||||
</p>
|
</p>
|
||||||
{!! Form::close() !!}
|
{!! Form::close() !!}
|
||||||
<div class="jumbotron text-center maincontentarea">
|
<div class="jumbotron text-center maincontentarea">
|
||||||
<h1>Alright {{ $username }}, here is where you can manage the bills you own</h1>
|
<h1>Alright {{ $username }}, here is where you can manage the bills you own</h1>
|
||||||
<br><br>
|
<br><br>
|
||||||
|
<div>
|
||||||
<div><h1 class="addbillmonthsection">
|
<h1 class="addbillmonthsection">
|
||||||
{!! Form::open(array('action' => 'BillController@managebill')) !!}
|
{!! Form::open(array('action' => 'BillController@managebill')) !!}
|
||||||
{{ Form::hidden('username', $username) }}
|
{{ Form::hidden('username', $username) }}
|
||||||
<br>
|
<br>
|
||||||
<p>
|
<p>
|
||||||
{{ Form::label('billnamelabel', 'billname', array('style' => 'font-size:500%'))}}
|
{{ Form::label('billnamelabel', 'billname', array('style' => 'font-size:500%'))}}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<select name="billname">
|
<select name="billname">
|
||||||
@foreach ($test as $bax)
|
@foreach ($test as $bax)
|
||||||
<option value={{ $bax }}>{{ $bax }}</option>
|
<option value={{ $bax }}>{{ $bax }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{ Form::label('datelabel', "enter date in yyyymm") }}
|
{{ Form::label('datelabel', "enter date in yyyymm") }}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{ Form::text('date', '') }}
|
{{ Form::text('date', '') }}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{ Form::label('totallabel', 'total bill amount') }}
|
{{ Form::label('totallabel', 'total bill amount') }}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{ Form::text('total', '') }}
|
{{ Form::text('total', '') }}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{ Form::label('eachlabel', 'how many people') }}
|
{{ Form::label('eachlabel', 'how many people') }}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{ Form::text('each', '') }}
|
{{ Form::text('each', '') }}
|
||||||
</p>
|
</p>
|
||||||
{{ Form::button('add bill', array('class' => 'createbillmonthamount', 'type' => 'submit')) }}
|
{{ Form::button('add bill', array('class' => 'createbillmonthamount', 'type' => 'submit')) }}
|
||||||
<br><br>
|
<br><br>
|
||||||
<h1>{{ $message }}</h1>
|
<h1>{{ $message }}</h1>
|
||||||
</p>
|
{!! Form::close() !!}
|
||||||
{!! Form::close() !!}
|
|
||||||
</h1>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="addpeoplesection">
|
<div class="addpeoplesection">
|
||||||
<br><br>
|
<br><br>
|
||||||
@@ -74,9 +72,9 @@
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<select name="billname">
|
<select name="billname">
|
||||||
@foreach ($test as $bax)
|
@foreach ($test as $bax)
|
||||||
<option value={{ $bax }}>{{ $bax }}</option>
|
<option value={{ $bax }}>{{ $bax }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
@@ -84,9 +82,9 @@
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<select name="payer">
|
<select name="payer">
|
||||||
@foreach ($users as $cax)
|
@foreach ($users as $cax)
|
||||||
<option value={{ $cax }}>{{ $cax }}</option>
|
<option value={{ $cax }}>{{ $cax }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
@@ -117,9 +115,9 @@
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<select name="billname">
|
<select name="billname">
|
||||||
@foreach ($test as $bax)
|
@foreach ($test as $bax)
|
||||||
<option value={{ $bax }}>{{ $bax }}</option>
|
<option value={{ $bax }}>{{ $bax }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
@@ -127,9 +125,9 @@
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<select name="payer">
|
<select name="payer">
|
||||||
@foreach ($users as $cax)
|
@foreach ($users as $cax)
|
||||||
<option value={{ $cax }}>{{ $cax }}</option>
|
<option value={{ $cax }}>{{ $cax }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
@@ -137,9 +135,9 @@
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<select name="responsibleid">
|
<select name="responsibleid">
|
||||||
@foreach ($responsibleid as $dax)
|
@foreach ($responsibleid as $dax)
|
||||||
<option value={{ $dax }}>{{ $dax }}</option>
|
<option value={{ $dax }}>{{ $dax }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
@@ -164,9 +162,9 @@
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<select name="payer">
|
<select name="payer">
|
||||||
@foreach ($users as $cax)
|
@foreach ($users as $cax)
|
||||||
<option value={{ $cax }}>{{ $cax }}</option>
|
<option value={{ $cax }}>{{ $cax }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
|
<!doctype>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>HomeIsWhereTheMoneyIs</title>
|
<title>HomeIsWhereTheMoneyIs</title>
|
||||||
@@ -10,53 +10,51 @@
|
|||||||
<!-- Latest compiled and minified JavaScript -->
|
<!-- Latest compiled and minified JavaScript -->
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="http://108.255.70.130/css/scc.css">
|
<link rel="stylesheet" type="text/css" href="http://108.255.70.130/css/scc.css">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<div>
|
||||||
<a href="/"><h1 class="logomaxipad">Home</h1></a>
|
<a href="/"><h1 class="logomaxipad">Home</h1></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="jumbotron text-center maincontentarea">
|
<div class="jumbotron text-center maincontentarea">
|
||||||
<h1 class="sectiontitle">Registration Page</h1>
|
<h1 class="sectiontitle">Registration Page</h1><br>
|
||||||
<br>
|
|
||||||
{{ Form::open(array('action' => 'HomeController@registerUser', 'method' => 'post')) }}
|
{{ Form::open(array('action' => 'HomeController@registerUser', 'method' => 'post')) }}
|
||||||
<p>
|
<p>
|
||||||
{{ Form::label('firstnamelabel', 'first name') }}
|
{{ Form::label('firstnamelabel', 'first name') }}
|
||||||
<br>
|
<br>
|
||||||
{{ Form::text('firstname', '') }}
|
{{ Form::text('firstname', '') }}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{ Form::label('lastnamelabel', 'last name') }}
|
{{ Form::label('lastnamelabel', 'last name') }}
|
||||||
<br>
|
<br>
|
||||||
{{ Form::text('lastname', '') }}
|
{{ Form::text('lastname', '') }}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{ Form::label('usernamelabel', 'username') }}
|
{{ Form::label('usernamelabel', 'username') }}
|
||||||
<br>
|
<br>
|
||||||
{{ Form::text('username', '') }}
|
{{ Form::text('username', '') }}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{ Form::label('passwordlabel', 'password') }}
|
{{ Form::label('passwordlabel', 'password') }}
|
||||||
<br>
|
<br>
|
||||||
{{ Form::password('password') }}
|
{{ Form::password('password') }}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{ Form::label('confirmlabel', 'confirm') }}
|
{{ Form::label('confirmlabel', 'confirm') }}
|
||||||
<br>
|
<br>
|
||||||
{{ Form::password('confirm') }}
|
{{ Form::password('confirm') }}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{{ Form::label('roomlabel', 'room') }}
|
{{ Form::label('roomlabel', 'room') }}
|
||||||
<br>
|
<br>
|
||||||
<select name="room" class="registeraccounttype">
|
<select name="room" class="registeraccounttype">
|
||||||
<option>single</option>
|
<option>single</option>
|
||||||
<option>double</option>
|
<option>double</option>
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<br>
|
<br>
|
||||||
{{ Form::submit('register me', array('class' => 'registeraccount')) }}
|
{{ Form::submit('register me', array('class' => 'registeraccount')) }}
|
||||||
</p>
|
</p>
|
||||||
{{ Form::close() }}
|
{{ Form::close() }}
|
||||||
<h1>{{ $message }}</h1>
|
<h1>{{ $message }}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -13,27 +13,25 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="jumbotron text-center maincontentarea">
|
<div class="jumbotron text-center maincontentarea">
|
||||||
<h1>What's good {{$username}}? it's your home page</h1>
|
<h1>Hey {{$username}}, how is it going? it's your home page</h1>
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
{!! Form::open(array('action' => 'BillController@create')) !!}
|
{!! Form::open(array('action' => 'BillController@create')) !!}
|
||||||
{{ Form::hidden('username', $username) }}
|
{{ Form::hidden('username', $username) }}
|
||||||
<p>
|
<p>
|
||||||
{{ Form::button('create', array('class' => 'createsection', 'type' => 'submit')) }}
|
{{ Form::button('create', array('class' => 'createsection', 'type' => 'submit')) }}
|
||||||
</p>
|
</p>
|
||||||
{!! Form::close() !!}
|
{!! Form::close() !!}
|
||||||
|
|
||||||
{!! Form::open(array('action' => 'BillController@manage')) !!}
|
{!! Form::open(array('action' => 'BillController@manage')) !!}
|
||||||
{{ Form::hidden('username', $username) }}
|
{{ Form::hidden('username', $username) }}
|
||||||
<p>
|
<p>
|
||||||
{{ Form::button('mange', array('class' => 'managesection', 'type' => 'submit')) }}
|
{{ Form::button('mange', array('class' => 'managesection', 'type' => 'submit')) }}
|
||||||
</p>
|
</p>
|
||||||
{!! Form::close() !!}
|
{!! Form::close() !!}
|
||||||
{!! Form::open(array('action' => 'BillController@view')) !!}
|
{!! Form::open(array('action' => 'BillController@view')) !!}
|
||||||
|
|
||||||
{{ Form::hidden('username', $username) }}
|
{{ Form::hidden('username', $username) }}
|
||||||
<p>
|
<p>
|
||||||
{{ Form::button('view', array('class' => 'viewsection', 'type' => 'submit')) }}
|
{{ Form::button('view', array('class' => 'viewsection', 'type' => 'submit')) }}
|
||||||
</p>
|
</p>
|
||||||
{!! Form::close() !!}
|
{!! Form::close() !!}
|
||||||
<button class="logout"><a href="/">log out</a></button>
|
<button class="logout"><a href="/">log out</a></button>
|
||||||
|
|||||||
@@ -13,14 +13,14 @@
|
|||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{!! Form::open(array('action' => 'HomeController@home')) !!}
|
{!! Form::open(array('action' => 'HomeController@home')) !!}
|
||||||
{{ Form::hidden('username', $username) }}
|
{{ Form::hidden('username', $username) }}
|
||||||
<p>
|
<p>
|
||||||
<div>
|
<div>
|
||||||
{{ Form::button('user home', array('class' => 'userhome', 'type' => 'submit')) }}
|
{{ Form::button('user home', array('class' => 'userhome', 'type' => 'submit')) }}
|
||||||
</div>
|
</div>
|
||||||
</p>
|
</p>
|
||||||
{!! Form::close() !!}
|
{!! Form::close() !!}
|
||||||
<div class="jumbotron text-center maincontentarea">
|
<div class="jumbotron text-center maincontentarea">
|
||||||
<h1>Alright {{ $username }}, here is where you can view bills that you need to pay...</h1>
|
<h1>Alright {{ $username }}, here is where you can view bills that you need to pay...</h1>
|
||||||
|
|
||||||
@@ -28,9 +28,9 @@
|
|||||||
{{ Form::hidden('username', $username) }}
|
{{ Form::hidden('username', $username) }}
|
||||||
<p>
|
<p>
|
||||||
<select name='tough'>
|
<select name='tough'>
|
||||||
@foreach ($grass as $record)
|
@foreach ($grass as $record)
|
||||||
<option value={{ $record }}>{{ $record }}</option>
|
<option value={{ $record }}>{{ $record }}</option>
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
@@ -45,12 +45,14 @@
|
|||||||
<th>total</th>
|
<th>total</th>
|
||||||
<th>owner</th>
|
<th>owner</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@for ($index=0; $index< $count ; $index++)
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ $billname }}</td>
|
<td>{{ $billname }} </td>
|
||||||
<td>{{ $amountpaid }}</td>
|
<td>{{ $amountpaid[$index] }}</td>
|
||||||
<td>{{ $total }}</td>
|
<td>{{ $total[$index] }}</td>
|
||||||
<td>{{ $owner }}</td>
|
<td>{{ $owner[$index] }} </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@endfor
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<button class="logout"><a href="/">log out</a></button>
|
<button class="logout"><a href="/">log out</a></button>
|
||||||
|
|||||||
Reference in New Issue
Block a user