Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pa2d4ti06
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Juliper
pa2d4ti06
Commits
6e6e8e63
Commit
6e6e8e63
authored
7 years ago
by
Juliper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push admin and owner file, controller
parent
8f5c7b5e
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
124 additions
and
87 deletions
+124
-87
AdminController.php
app/Http/Controllers/AdminController.php
+18
-2
RegisterController.php
app/Http/Controllers/Auth/RegisterController.php
+3
-1
home.blade.php
resources/views/vendor/adminlte/home.blade.php
+0
-1
addOwner.blade.php
...es/views/vendor/adminlte/layouts/admin/addOwner.blade.php
+80
-0
landing.blade.php
resources/views/vendor/adminlte/layouts/landing.blade.php
+1
-1
contentheader.blade.php
.../vendor/adminlte/layouts/partials/contentheader.blade.php
+1
-1
htmlheader.blade.php
...ews/vendor/adminlte/layouts/partials/htmlheader.blade.php
+1
-1
mainheader.blade.php
...ews/vendor/adminlte/layouts/partials/mainheader.blade.php
+2
-69
sidebar.blade.php
.../views/vendor/adminlte/layouts/partials/sidebar.blade.php
+13
-11
message.php
.../admin-lte-template-laravel/resources/lang/en/message.php
+5
-0
No files found.
app/Http/Controllers/AdminController.php
View file @
6e6e8e63
...
...
@@ -3,9 +3,14 @@
namespace
App\Http\Controllers
;
use
Illuminate\Http\Request
;
use
App\User
;
use
Validator
;
use
App\Http\Controllers\Controller
;
use
Illuminate\Foundation\Auth\RegistersUsers
;
class
AdminController
extends
Controller
{
/**
* Display a listing of the resource.
*
...
...
@@ -23,7 +28,7 @@ class AdminController extends Controller
*/
public
function
create
()
{
return
view
(
''
);
return
view
(
'
adminlte::layouts.admin.addOwner
'
);
}
/**
...
...
@@ -34,7 +39,18 @@ class AdminController extends Controller
*/
public
function
store
(
Request
$request
)
{
//
$data
=
$request
->
all
();
$user
=
new
User
();
$user
->
name
=
$data
[
'name'
];
$user
->
username
=
$data
[
'username'
];
$user
->
email
=
$data
[
'email'
];
$user
->
password
=
bcrypt
(
$data
[
'password'
]);
$user
->
role
=
'Owner'
;
dd
(
$user
);
$user
->
save
();
}
/**
...
...
This diff is collapsed.
Click to expand it.
app/Http/Controllers/Auth/RegisterController.php
View file @
6e6e8e63
...
...
@@ -41,7 +41,7 @@ class RegisterController extends Controller
*
* @var string
*/
protected
$redirectTo
=
'/home'
;
//
protected $redirectTo = '/home';
/**
* Create a new controller instance.
...
...
@@ -79,8 +79,10 @@ class RegisterController extends Controller
{
return
User
::
create
([
'name'
=>
$data
[
'name'
],
'username'
=>
$data
[
'username'
],
'email'
=>
$data
[
'email'
],
'password'
=>
bcrypt
(
$data
[
'password'
]),
'role'
=>
$data
[
'role'
],
]);
}
}
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/home.blade.php
View file @
6e6e8e63
...
...
@@ -4,7 +4,6 @@
{{
trans
(
'adminlte_lang::message.home'
)
}}
@
endsection
@
section
(
'main-content'
)
<
div
class
="
container
-
fluid
spark
-
screen
">
<div class="
row
">
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/admin/addOwner.blade.php
View file @
6e6e8e63
@
extends
(
'adminlte::layouts.app'
)
@
section
(
'htmlheader_title'
)
{{
trans
(
'adminlte_lang::message.home'
)
}}
@
endsection
@
section
(
'main-content'
)
<
div
class
="
container
-
fluid
spark
-
screen
">
<div class="
row
">
<div class="
col
-
md
-
10
col
-
md
-
offset
-
1
">
<div class="
panel
panel
-
default
">
<div id="
app
">
@if (count(
$errors
) > 0)
<div class="
alert
alert
-
danger
">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
<ul>
@foreach (
$errors->all
() as
$error
)
<li>{{
$error
}}</li>
@endforeach
</ul>
</div>
@endif
<div class="
register
-
box
-
body
">
<p class="
login
-
box
-
msg
">{{ trans('adminlte_lang::message.registermember') }}</p>
<form action="
{{
url
(
'admin'
)
}}
" method="
post
">
<input type="
hidden
" name="
_token
" value="
{{
csrf_token
()
}}
">
<div class="
form
-
group
has
-
feedback
">
<input type="
text
" class="
form
-
control
" placeholder="
{{
trans
(
'adminlte_lang::message.fullname'
)
}}
" name="
name
" value="
{{
old
(
'name'
)
}}
"/>
<span class="
glyphicon
glyphicon
-
user
form
-
control
-
feedback
"></span>
</div>
<div class="
form
-
group
has
-
feedback
">
<input type="
text
" class="
form
-
control
" placeholder="
{{
trans
(
'adminlte_lang::message.username'
)
}}
" name="
username
" value="
{{
old
(
'username'
)
}}
"/>
<span class="
glyphicon
glyphicon
-
user
form
-
control
-
feedback
"></span>
</div>
<div class="
form
-
group
has
-
feedback
">
<input type="
email
" class="
form
-
control
" placeholder="
{{
trans
(
'adminlte_lang::message.email'
)
}}
" name="
email
" value="
{{
old
(
'email'
)
}}
"/>
<span class="
glyphicon
glyphicon
-
envelope
form
-
control
-
feedback
"></span>
</div>
<div class="
form
-
group
has
-
feedback
">
<input type="
password
" class="
form
-
control
" placeholder="
{{
trans
(
'adminlte_lang::message.password'
)
}}
" name="
password
"/>
<span class="
glyphicon
glyphicon
-
lock
form
-
control
-
feedback
"></span>
</div>
<div class="
form
-
group
has
-
feedback
">
<input type="
password
" class="
form
-
control
" placeholder="
{{
trans
(
'adminlte_lang::message.retrypepassword'
)
}}
" name="
password_confirmation
"/>
<span class="
glyphicon
glyphicon
-
log
-
in
form
-
control
-
feedback
"></span>
</div>
<div class="
form
-
group
has
-
feedback
">
<input value="
Owner
" type="
text
" class="
form
-
control
" placeholder="
{{
trans
(
'adminlte_lang::message.role'
)
}}
" name="
role
" disabled/>
<span class="
glyphicon
glyphicon
-
wrench
form
-
control
-
feedback
"></span>
</div>
<div class="
row
">
<div class="
col
-
xs
-
1
">
<label>
<div class="
checkbox_register
icheck
">
<label>
<input type="
checkbox
" name="
terms
">
</label>
</div>
</label>
</div><!-- /.col -->
<div class="
col
-
xs
-
6
">
<div class="
form
-
group
">
<button type="
button
" class="
btn
btn
-
block
btn
-
flat
" data-toggle="
modal
" data-target="
#termsModal">{{ trans('adminlte_lang::message.terms') }}</button>
</
div
>
</
div
><!--
/.
col
-->
<
div
class
="
col
-
xs
-
4
col
-
xs
-
push
-
1
">
<button type="
submit
" class="
btn
btn
-
primary
btn
-
block
btn
-
flat
">{{ trans('adminlte_lang::message.register') }}</button>
</div><!-- /.col -->
</div>
</form>
</div><!-- /.form-box -->
</div>
</div>
</div>
</div>
</div>
@endsection
\ No newline at end of file
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/landing.blade.php
View file @
6e6e8e63
...
...
@@ -51,7 +51,7 @@ Landing page based on Pratt: http://blacktie.co/demo/pratt/
<div
class=
"navbar-collapse collapse"
>
<ul
class=
"nav navbar-nav"
>
<li
class=
"active"
><a
href=
"#home"
class=
"smoothScroll"
>
{{ trans('adminlte_lang::message.home') }}
</a></li>
<li><a
href=
"#desc"
class=
"smoothScroll"
>
{{ trans('adminlte_lang::message.
description
') }}
</a></li>
<li><a
href=
"#desc"
class=
"smoothScroll"
>
{{ trans('adminlte_lang::message.
homestay
') }}
</a></li>
<li><a
href=
"#showcase"
class=
"smoothScroll"
>
{{ trans('adminlte_lang::message.showcase') }}
</a></li>
<li><a
href=
"#contact"
class=
"smoothScroll"
>
{{ trans('adminlte_lang::message.contact') }}
</a></li>
</ul>
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/partials/contentheader.blade.php
View file @
6e6e8e63
<!-- Content Header (Page header) -->
<section
class=
"content-header"
>
<h1>
@yield('contentheader_title'
, 'Page Header here'
)
@yield('contentheader_title')
<small>
@yield('contentheader_description')
</small>
</h1>
<ol
class=
"breadcrumb"
>
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/partials/htmlheader.blade.php
View file @
6e6e8e63
<head>
<meta
charset=
"UTF-8"
>
<title>
AdminLTE 2 with Laravel
- @yield('htmlheader_title', 'Your title here')
</title>
<title>
SI Booking Homestay
- @yield('htmlheader_title', 'Your title here')
</title>
<meta
content=
'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'
name=
'viewport'
>
<!-- CSRF Token -->
<meta
name=
"csrf-token"
content=
"{{ csrf_token() }}"
>
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/partials/mainheader.blade.php
View file @
6e6e8e63
...
...
@@ -20,66 +20,9 @@
<ul
class=
"nav navbar-nav"
>
<!-- Messages: style can be found in dropdown.less-->
<li
class=
"dropdown messages-menu"
>
<!-- Menu toggle button -->
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
<i
class=
"fa fa-envelope-o"
></i>
<span
class=
"label label-success"
>
4
</span>
</a>
<ul
class=
"dropdown-menu"
>
<li
class=
"header"
>
{{ trans('adminlte_lang::message.tabmessages') }}
</li>
<li>
<!-- inner menu: contains the messages -->
<ul
class=
"menu"
>
<li>
<!-- start message -->
<a
href=
"#"
>
<div
class=
"pull-left"
>
<!-- User Image -->
<img
src=
"{{ Gravatar::get($user->email) }}"
class=
"img-circle"
alt=
"User Image"
/>
</div>
<!-- Message title and timestamp -->
<h4>
{{ trans('adminlte_lang::message.supteam') }}
<small><i
class=
"fa fa-clock-o"
></i>
5 mins
</small>
</h4>
<!-- The message -->
<p>
{{ trans('adminlte_lang::message.awesometheme') }}
</p>
</a>
</li>
<!-- end message -->
</ul>
<!-- /.menu -->
</li>
<li
class=
"footer"
><a
href=
"#"
>
c
</a></li>
</ul>
</li>
<!-- /.messages-menu -->
<!-- Notifications Menu -->
<li
class=
"dropdown notifications-menu"
>
<!-- Menu toggle button -->
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
<i
class=
"fa fa-bell-o"
></i>
<span
class=
"label label-warning"
>
10
</span>
</a>
<ul
class=
"dropdown-menu"
>
<li
class=
"header"
>
{{ trans('adminlte_lang::message.notifications') }}
</li>
<li>
<!-- Inner Menu: contains the notifications -->
<ul
class=
"menu"
>
<li>
<!-- start notification -->
<a
href=
"#"
>
<i
class=
"fa fa-users text-aqua"
></i>
{{ trans('adminlte_lang::message.newmembers') }}
</a>
</li>
<!-- end notification -->
</ul>
</li>
<li
class=
"footer"
><a
href=
"#"
>
{{ trans('adminlte_lang::message.viewall') }}
</a></li>
</ul>
</li>
<!-- Tasks Menu -->
<li
class=
"dropdown tasks-menu"
>
<!-- Menu Toggle Button -->
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
<i
class=
"fa fa-flag-o"
></i>
<span
class=
"label label-danger"
>
9
</span>
</a>
<ul
class=
"dropdown-menu"
>
<li
class=
"header"
>
{{ trans('adminlte_lang::message.tasks') }}
</li>
<li>
...
...
@@ -127,21 +70,11 @@
<img
src=
"{{ Gravatar::get($user->email) }}"
class=
"img-circle"
alt=
"User Image"
/>
<p>
{{ Auth::user()->name }}
<small>
{{ trans('adminlte_lang::message.login') }}
Nov. 2012
</small>
<small>
{{ trans('adminlte_lang::message.login') }}
</small>
</p>
</li>
<!-- Menu Body -->
<li
class=
"user-body"
>
<div
class=
"col-xs-4 text-center"
>
<a
href=
"#"
>
{{ trans('adminlte_lang::message.followers') }}
</a>
</div>
<div
class=
"col-xs-4 text-center"
>
<a
href=
"#"
>
{{ trans('adminlte_lang::message.sales') }}
</a>
</div>
<div
class=
"col-xs-4 text-center"
>
<a
href=
"#"
>
{{ trans('adminlte_lang::message.friends') }}
</a>
</div>
</li>
<!-- Menu Footer-->
<li
class=
"user-footer"
>
<div
class=
"pull-left"
>
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/partials/sidebar.blade.php
View file @
6e6e8e63
...
...
@@ -31,17 +31,19 @@
<!-- Sidebar Menu -->
<ul
class=
"sidebar-menu"
>
<li
class=
"header"
>
{{ trans('adminlte_lang::message.header') }}
</li>
<!-- Optionally, you can add icons to the links -->
<li
class=
"active"
><a
href=
"{{ url('home') }}"
><i
class=
'fa fa-link'
></i>
<span>
{{ trans('adminlte_lang::message.home') }}
</span></a></li>
<li><a
href=
"{{url('admin/create')}}"
><i
class=
'fa fa-link'
></i>
<span>
{{ trans('adminlte_lang::message.addOwner') }}
</span></a></li>
<li
class=
"treeview"
>
<a
href=
"#"
><i
class=
'fa fa-link'
></i>
<span>
{{ trans('adminlte_lang::message.multilevel') }}
</span>
<i
class=
"fa fa-angle-left pull-right"
></i></a>
<ul
class=
"treeview-menu"
>
<li><a
href=
"#"
>
{{ trans('adminlte_lang::message.linklevel2') }}
</a></li>
<li><a
href=
"#"
>
{{ trans('adminlte_lang::message.linklevel2') }}
</a></li>
</ul>
</li>
@if(Auth::user()->role =="Admin")
<li
class=
"header"
>
{{ trans('adminlte_lang::message.header') }}
</li>
<!-- Optionally, you can add icons to the links -->
<li
class=
"active"
><a
href=
"{{ url('home') }}"
><i
class=
'fa fa-home'
></i>
<span>
{{ trans('adminlte_lang::message.home') }}
</span></a></li>
<li><a
href=
"{{url('admin/create')}}"
><i
class=
'fa fa-plus'
></i>
<span>
{{ trans('adminlte_lang::message.addOwner') }}
</span></a></li>
@elseif(Auth::user()->role=="Owner")
@endif
</ul>
<!-- /.sidebar-menu -->
</section>
<!-- /.sidebar -->
...
...
This diff is collapsed.
Click to expand it.
vendor/acacha/admin-lte-template-laravel/resources/lang/en/message.php
View file @
6e6e8e63
...
...
@@ -129,5 +129,10 @@ return [
'fullname'
=>
'Full Name'
,
'username'
=>
'Username'
,
'addOwner'
=>
'Add Owner Homestay'
,
'homestay'
=>
'Homestay'
,
'role'
=>
'Role'
,
'username'
=>
'Username'
,
''
=>
''
,
];
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment