diff --git a/app/Http/Controllers/BillController.php b/app/Http/Controllers/BillController.php
new file mode 100644
index 0000000..a5a68c8
--- /dev/null
+++ b/app/Http/Controllers/BillController.php
@@ -0,0 +1,50 @@
+ $stuff->input('username'), 'message' => '']);
+ }
+ public function createbill(Request $stuff)
+ {
+ $billname = $stuff->input('billname');
+ $emptbillname = isset($billname);
+ if (!$emptbillname)
+ {
+ return view('createbill', ['username' => $stuff->input('username'), 'message' => 'Enter something in the bills...']);
+ }
+
+ DB::table('bills')->insert([
+ 'billname' => $billname, 'username' => $stuff->input('username')
+ ]);
+ return view('createbill', ['username' => $stuff->input('username'), 'message' => 'Bill created']);
+ }
+ public function manage(Request $stuff)
+ {
+ return view('manage', ['username' => $stuff->input('username')]);
+ }
+ public function view(Request $stuff)
+ {
+ //DB::table('users')->where('username', $username)->first();
+ //$bills[] = dDB::table('bills')->where('')
+ $billrecord = DB::table('bills')->get();
+ $bills;
+ foreach ($billrecord as $bill) {
+ echo $bill->billname;
+ echo "
";
+ $bills[] = $bill->billname;
+ }
+ foreach ($bills as $w) {
+ echo $w;
+ echo "
";
+ }
+ return view('view', ['username' => $stuff->input('username')])->with('billrecord', $billrecord);
+ //return view('view', ['username' => $stuff->input('username')])->with('bills', $bills);
+ }
+}
diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php
index fff470f..59ef081 100644
--- a/app/Http/Controllers/HomeController.php
+++ b/app/Http/Controllers/HomeController.php
@@ -72,4 +72,8 @@ class HomeController extends Controller
return view('userhome', ['username' => $username]);
}
}
+ public function home(Request $stuff)
+ {
+ return view('userhome', ['username' => $stuff->input('username')]);
+ }
}
diff --git a/resources/views/createbill.blade.php b/resources/views/createbill.blade.php
new file mode 100644
index 0000000..032f4ab
--- /dev/null
+++ b/resources/views/createbill.blade.php
@@ -0,0 +1,38 @@
+
+
+
+ {{ Form::button('user Home', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }} +
+ {!! Form::close() !!} + + {!! Form::open(array('action' => 'BillController@createbill')) !!} + {{ Form::hidden('username', $username) }} ++ {{ Form::label('lbl', 'bill name', array('style' => 'font-size:400%')) }} + {{ Form::text('billname', '', array('style' => 'font-size:400%')) }} +
++ {{ Form::button('Create Bill', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }} +
+ {!! Form::close() !!} ++ {{ Form::button('user Home', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }} +
+ {!! Form::close() !!} + + {!! Form::open(array('action' => 'BillController@createbill')) !!} + {{ Form::hidden('username', $username) }} ++ {{ Form::label('lbl', 'bill name', array('style' => 'font-size:400%')) }} + {{ Form::text('billname', '', array('style' => 'font-size:400%')) }} +
++ {{ Form::button('Create Bill', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }} +
+ {!! Form::close() !!} ++ {{ Form::button('create', array('style' => 'height:40%;width:70%', '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::close() !!} + {!! Form::open(array('action' => 'BillController@view')) !!} + + {{ Form::hidden('username', $username) }} ++ {{ Form::button('view', array('style' => 'height:40%;width:70%', 'type' => 'submit')) }} +
+ {!! Form::close() !!}