Skip to content

Commit 6bb859d

Browse files
committed
user form design done
1 parent f5916fe commit 6bb859d

File tree

9 files changed

+202
-16
lines changed

9 files changed

+202
-16
lines changed

app/Http/Controllers/BazarController.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
class BazarController extends Controller
88
{
99
public function add() {
10-
return view('admin.master');
10+
return view('admin.user.user_form');
11+
}
12+
13+
public function addMember(Request $request) {
14+
$validate = $this->validate($request,[
15+
'name' => 'required|max:2',
16+
'email' => 'required|max:2'
17+
]);
18+
return redirect('/member/add')->with('message','Done');
1119
}
1220
}

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"php": ">=7.0.0",
99
"fideloper/proxy": "~3.3",
1010
"laravel/framework": "5.5.*",
11-
"laravel/tinker": "~1.0"
11+
"laravel/tinker": "~1.0",
12+
"laravelcollective/html": "^5.5"
1213
},
1314
"require-dev": {
1415
"filp/whoops": "~2.0",

composer.lock

Lines changed: 67 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/app.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@
163163
Illuminate\Translation\TranslationServiceProvider::class,
164164
Illuminate\Validation\ValidationServiceProvider::class,
165165
Illuminate\View\ViewServiceProvider::class,
166+
Collective\Html\HtmlServiceProvider::class,
166167

167168
/*
168169
* Package Service Providers...
@@ -225,6 +226,8 @@
225226
'URL' => Illuminate\Support\Facades\URL::class,
226227
'Validator' => Illuminate\Support\Facades\Validator::class,
227228
'View' => Illuminate\Support\Facades\View::class,
229+
'Form' => Collective\Html\FormFacade::class,
230+
'Html' => Collective\Html\HtmlFacade::class,
228231

229232
],
230233

resources/views/admin/common/header.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1">
6-
<title>Login</title>
6+
<title>@yield('title')</title>
77

88
<link href="{{ asset('public/backend/css/bootstrap.min.css') }}" rel="stylesheet">
99
<link href="{{ asset('public/backend/css/datepicker3.css') }}" rel="stylesheet">

resources/views/admin/common/sidebar.blade.php

Lines changed: 67 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,87 @@
66
</form>
77
<ul class="nav menu">
88
<li class="active"><a href="index.html"><svg class="glyph stroked dashboard-dial"><use xlink:href="#stroked-dashboard-dial"></use></svg> Dashboard</a></li>
9-
<li><a href="widgets.html"><svg class="glyph stroked calendar"><use xlink:href="#stroked-calendar"></use></svg> Widgets</a></li>
10-
<li><a href="charts.html"><svg class="glyph stroked line-graph"><use xlink:href="#stroked-line-graph"></use></svg> Charts</a></li>
11-
<li><a href="tables.html"><svg class="glyph stroked table"><use xlink:href="#stroked-table"></use></svg> Tables</a></li>
12-
<li><a href="forms.html"><svg class="glyph stroked pencil"><use xlink:href="#stroked-pencil"></use></svg> Forms</a></li>
13-
<li><a href="panels.html"><svg class="glyph stroked app-window"><use xlink:href="#stroked-app-window"></use></svg> Alerts &amp; Panels</a></li>
14-
<li><a href="icons.html"><svg class="glyph stroked star"><use xlink:href="#stroked-star"></use></svg> Icons</a></li>
159
<li class="parent ">
1610
<a href="#">
17-
<span data-toggle="collapse" href="#sub-item-1"><svg class="glyph stroked chevron-down"><use xlink:href="#stroked-chevron-down"></use></svg></span> Dropdown
11+
<span data-toggle="collapse" href="#sub-item-1"><svg class="glyph stroked chevron-down"><use xlink:href="#stroked-chevron-down"></use></svg></span> Members
1812
</a>
1913
<ul class="children collapse" id="sub-item-1">
2014
<li>
2115
<a class="" href="#">
22-
<svg class="glyph stroked chevron-right"><use xlink:href="#stroked-chevron-right"></use></svg> Sub Item 1
16+
<svg class="glyph stroked chevron-right"><use xlink:href="#stroked-chevron-right"></use></svg> Add
2317
</a>
2418
</li>
2519
<li>
2620
<a class="" href="#">
27-
<svg class="glyph stroked chevron-right"><use xlink:href="#stroked-chevron-right"></use></svg> Sub Item 2
21+
<svg class="glyph stroked chevron-right"><use xlink:href="#stroked-chevron-right"></use></svg> Manage
22+
</a>
23+
</li>
24+
</ul>
25+
</li>
26+
<li class="parent ">
27+
<a href="#">
28+
<span data-toggle="collapse" href="#sub-item-1"><svg class="glyph stroked chevron-down"><use xlink:href="#stroked-chevron-down"></use></svg></span> Monthly Bill
29+
</a>
30+
<ul class="children collapse" id="sub-item-1">
31+
<li>
32+
<a class="" href="#">
33+
<svg class="glyph stroked chevron-right"><use xlink:href="#stroked-chevron-right"></use></svg> Add
34+
</a>
35+
</li>
36+
<li>
37+
<a class="" href="#">
38+
<svg class="glyph stroked chevron-right"><use xlink:href="#stroked-chevron-right"></use></svg> Manage
39+
</a>
40+
</li>
41+
</ul>
42+
</li>
43+
<li class="parent ">
44+
<a href="#">
45+
<span data-toggle="collapse" href="#sub-item-1"><svg class="glyph stroked chevron-down"><use xlink:href="#stroked-chevron-down"></use></svg></span> Daily Bill
46+
</a>
47+
<ul class="children collapse" id="sub-item-1">
48+
<li>
49+
<a class="" href="#">
50+
<svg class="glyph stroked chevron-right"><use xlink:href="#stroked-chevron-right"></use></svg> Add
51+
</a>
52+
</li>
53+
<li>
54+
<a class="" href="#">
55+
<svg class="glyph stroked chevron-right"><use xlink:href="#stroked-chevron-right"></use></svg> Manage
56+
</a>
57+
</li>
58+
</ul>
59+
</li>
60+
<li class="parent ">
61+
<a href="#">
62+
<span data-toggle="collapse" href="#sub-item-1"><svg class="glyph stroked chevron-down"><use xlink:href="#stroked-chevron-down"></use></svg></span> Bazar
63+
</a>
64+
<ul class="children collapse" id="sub-item-1">
65+
<li>
66+
<a class="" href="#">
67+
<svg class="glyph stroked chevron-right"><use xlink:href="#stroked-chevron-right"></use></svg> Add
68+
</a>
69+
</li>
70+
<li>
71+
<a class="" href="#">
72+
<svg class="glyph stroked chevron-right"><use xlink:href="#stroked-chevron-right"></use></svg> Manage
73+
</a>
74+
</li>
75+
</ul>
76+
</li>
77+
<li class="parent ">
78+
<a href="#">
79+
<span data-toggle="collapse" href="#sub-item-1"><svg class="glyph stroked chevron-down"><use xlink:href="#stroked-chevron-down"></use></svg></span> Payment
80+
</a>
81+
<ul class="children collapse" id="sub-item-1">
82+
<li>
83+
<a class="" href="#">
84+
<svg class="glyph stroked chevron-right"><use xlink:href="#stroked-chevron-right"></use></svg> Add
2885
</a>
2986
</li>
3087
<li>
3188
<a class="" href="#">
32-
<svg class="glyph stroked chevron-right"><use xlink:href="#stroked-chevron-right"></use></svg> Sub Item 3
89+
<svg class="glyph stroked chevron-right"><use xlink:href="#stroked-chevron-right"></use></svg> Manage
3390
</a>
3491
</li>
3592
</ul>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
@include('admin.common.header')
22
@include('admin.common.sidebar')
3-
@yield('admin.')
3+
@yield('main_content')
44
@include('admin.common.footer')
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
@extends('admin.master')
2+
@section('title')
3+
Add Member
4+
@endsection
5+
@section('main_content')
6+
<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">
7+
<div class="row">
8+
<div class="col-lg-12">
9+
<div class="panel panel-default">
10+
<div class="panel-heading">Form Elements</div>
11+
{{ Session::get('message') ? Session::get('message') : "" }}
12+
<div class="panel-body">
13+
<div class="col-md-offset-3 col-md-6">
14+
{!! Form::open() !!}
15+
<div class="form-group">
16+
<label>Name</label>
17+
<input class="form-control" placeholder="Please enter name here" name="name" value="{{ old('name') }}">
18+
<span style="color: red;">{{ $errors->first('name') }}</span>
19+
</div>
20+
<div class="form-group">
21+
<label>Email</label>
22+
<input class="form-control" placeholder="Please enter email here" name="email" value="{{ old('email') }}">
23+
</div>
24+
<div class="form-group">
25+
<label>Phone</label>
26+
<input class="form-control" placeholder="Please enter phone here">
27+
</div>
28+
<div class="form-group">
29+
<label>Join Date</label>
30+
<input class="form-control" placeholder="Please follow the format(year-month-day)">
31+
</div>
32+
<div class="form-group">
33+
<label>User Type</label>
34+
<select class="form-control">
35+
<option>--Select a type--</option>
36+
<option>Mess Member</option>
37+
<option>Sub Admin</option>
38+
</select>
39+
</div>
40+
<div class="form-group">
41+
<input class="btn btn-primary pull-right" type="submit" value="Add Member">
42+
</div>
43+
</form>
44+
</div>
45+
</div>
46+
</div><!-- /.col-->
47+
</div><!-- /.row -->
48+
49+
</div><!--/.main-->
50+
@endsection

routes/web.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@
2222
/*
2323
* demo
2424
*/
25-
Route::get('/demo','Bazarcontroller@add');
25+
Route::get('/member/add','Bazarcontroller@add');
26+
Route::post('/member/add','Bazarcontroller@addMember');
2627

0 commit comments

Comments
 (0)