Skip to content

Commit 08bca80

Browse files
Merge pull request #9 from ovidiustanc123/update-v4
bugfixing
2 parents 3c4bd5f + c2dd13a commit 08bca80

File tree

17 files changed

+1402
-1273
lines changed

17 files changed

+1402
-1273
lines changed

app/Http/Livewire/Auth/Login.php

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
namespace App\Http\Livewire\Auth;
44

5+
use App\Models\User;
56
use Livewire\Component;
67

78
class Login extends Component
89
{
910

1011
public $email = '';
1112
public $password = '';
13+
public $remember_me = false;
1214

1315
protected $rules = [
1416
'email' => 'required|email',
@@ -17,20 +19,23 @@ class Login extends Component
1719

1820
//This mounts the default credentials for the admin. Remove this section if you want to make it public.
1921
public function mount()
20-
{
21-
$this->fill([
22-
'email' => 'admin@volt.com',
23-
'password' => 'secret',
22+
{
23+
$this->fill([
24+
'email' => 'admin@volt.com',
25+
'password' => 'secret',
2426
]);
25-
}
27+
}
2628

2729
public function login()
2830
{
2931
$credentials = $this->validate();
30-
return auth()->attempt($credentials)
31-
? redirect()->intended('/profile')
32-
: $this->addError('email', trans('auth.failed'));
33-
32+
if (auth()->attempt(['email' => $this->email, 'password' => $this->password], $this->remember_me)) {
33+
$user = User::where(['email' => $this->email])->first();
34+
auth()->login($user, $this->remember_me);
35+
return redirect()->intended('/dashboard');
36+
} else {
37+
return $this->addError('email', trans('auth.failed'));
38+
}
3439
}
3540

3641
public function render()

app/Http/Livewire/Users.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
namespace App\Http\Livewire;
4+
5+
use Livewire\Component;
6+
7+
class Users extends Component
8+
{
9+
public function render()
10+
{
11+
return view('livewire.users');
12+
}
13+
}

database/seeders/UserSeeder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class UserSeeder extends Seeder
1616
public function run()
1717
{
1818
DB::table("users")->insert([
19+
'first_name' => 'Admin',
1920
'email' => 'admin@volt.com',
2021
'password' => Hash::make('secret'),
2122
]);

public/assets/img/updivision.png

27.1 KB
Loading

resources/views/layouts/app.blade.php

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,39 @@
11
<x-layouts.base>
22

33

4-
@if(in_array(request()->route()->getName(), ['dashboard', 'profile', 'bootstrap-tables', 'transactions', 'buttons', 'forms', 'modals', 'notifications', 'typography', 'upgrade-to-pro']))
5-
6-
{{-- Nav --}}
7-
@include('layouts.nav')
8-
{{-- SideNav --}}
9-
@include('layouts.sidenav')
10-
<main class="content">
4+
@if(in_array(request()->route()->getName(), ['dashboard', 'profile', 'users', 'bootstrap-tables', 'transactions',
5+
'buttons',
6+
'forms', 'modals', 'notifications', 'typography', 'upgrade-to-pro']))
7+
8+
{{-- Nav --}}
9+
@include('layouts.nav')
10+
{{-- SideNav --}}
11+
@include('layouts.sidenav')
12+
<main class="content">
1113
{{-- TopBar --}}
1214
@include('layouts.topbar')
1315
{{ $slot }}
1416
{{-- Footer --}}
1517
@include('layouts.footer')
16-
</main>
18+
</main>
1719

18-
@elseif(in_array(request()->route()->getName(), ['register', 'register-example', 'login', 'login-example', '404', '500', 'forgot-password', 'forgot-password-example', 'reset-password','reset-password-example', 'lock']))
20+
@elseif(in_array(request()->route()->getName(), ['register', 'register-example', 'login', 'login-example',
21+
'forgot-password', 'forgot-password-example', 'reset-password','reset-password-example']))
22+
23+
{{ $slot }}
24+
{{-- Footer --}}
25+
@include('layouts.footer')
1926

20-
{{ $slot }}
27+
28+
@elseif(in_array(request()->route()->getName(), ['404', '500']))
29+
30+
{{ $slot }}
2131

2232
@elseif(in_array(request()->route()->getName(), ['index']))
2333

24-
@include('layouts.index.indexnav')
25-
{{ $slot }}
26-
@include('layouts.index.indexfooter')
34+
@include('layouts.index.indexnav')
35+
{{ $slot }}
36+
@include('layouts.index.indexfooter')
2737

2838
@endif
2939
</x-layouts.base>

resources/views/layouts/footer.blade.php

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@
44
href="#theme-settings" role="button" aria-expanded="false" aria-controls="theme-settings"></button>
55
<div class="d-flex justify-content-between align-items-center mb-3">
66
<p class="m-0 mb-1 me-4 fs-7">Open source <span role="img" aria-label="gratitude">💛</span></p>
7-
<a class="github-button" href="https://github.com/themesberg/volt-bootstrap-5-dashboard"
7+
<a class="github-button" href="https://github.com/themesberg/volt-laravel-admin-dashboard"
88
data-color-scheme="no-preference: dark; light: light; dark: light;" data-icon="octicon-star"
99
data-size="large" data-show-count="true"
1010
aria-label="Star themesberg/volt-bootstrap-5-dashboard on GitHub">Star</a>
1111
</div>
12-
<a href="https://themesberg.com/product/admin-dashboard/volt-bootstrap-5-dashboard" target="_blank"
12+
<a href="https://themesberg.com/product/admin-dashboard/volt-laravel-admin-dashboard" target="_blank"
1313
class="btn btn-secondary d-inline-flex align-items-center justify-content-center mb-3 w-100">
14-
Download
15-
<svg class="icon icon-xs ms-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M2 9.5A3.5 3.5 0 005.5 13H9v2.586l-1.293-1.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 15.586V13h2.5a4.5 4.5 0 10-.616-8.958 4.002 4.002 0 10-7.753 1.977A3.5 3.5 0 002 9.5zm9 3.5H9V8a1 1 0 012 0v5z" clip-rule="evenodd"></path></svg>
14+
Download
15+
<svg class="icon icon-xs ms-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
16+
<path fill-rule="evenodd"
17+
d="M2 9.5A3.5 3.5 0 005.5 13H9v2.586l-1.293-1.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 15.586V13h2.5a4.5 4.5 0 10-.616-8.958 4.002 4.002 0 10-7.753 1.977A3.5 3.5 0 002 9.5zm9 3.5H9V8a1 1 0 012 0v5z"
18+
clip-rule="evenodd"></path>
19+
</svg>
1620
</a>
1721
<p class="fs-7 text-gray-300 text-center">Available in the following technologies:</p>
1822
<div class="d-flex justify-content-center">
@@ -29,15 +33,21 @@ class="btn btn-secondary d-inline-flex align-items-center justify-content-center
2933
<div class="card theme-settings bg-gray-800 theme-settings-expand" id="theme-settings-expand">
3034
<div class="card-body bg-gray-800 text-white rounded-top p-3 py-2">
3135
<span class="fw-bold d-inline-flex align-items-center h6">
32-
<svg class="icon icon-xs me-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z" clip-rule="evenodd"></path></svg>
36+
<svg class="icon icon-xs me-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
37+
<path fill-rule="evenodd"
38+
d="M11.49 3.17c-.38-1.56-2.6-1.56-2.98 0a1.532 1.532 0 01-2.286.948c-1.372-.836-2.942.734-2.106 2.106.54.886.061 2.042-.947 2.287-1.561.379-1.561 2.6 0 2.978a1.532 1.532 0 01.947 2.287c-.836 1.372.734 2.942 2.106 2.106a1.532 1.532 0 012.287.947c.379 1.561 2.6 1.561 2.978 0a1.533 1.533 0 012.287-.947c1.372.836 2.942-.734 2.106-2.106a1.533 1.533 0 01.947-2.287c1.561-.379 1.561-2.6 0-2.978a1.532 1.532 0 01-.947-2.287c.836-1.372-.734-2.942-2.106-2.106a1.532 1.532 0 01-2.287-.947zM10 13a3 3 0 100-6 3 3 0 000 6z"
39+
clip-rule="evenodd"></path>
40+
</svg>
3341
Settings
3442
</span>
3543
</div>
3644
</div>
3745
<footer class="bg-white rounded shadow p-5 mb-4 mt-4">
3846
<div class="row">
3947
<div class="col-12 col-md-4 col-xl-6 mb-4 mb-md-0">
40-
<p class="mb-0 text-center text-lg-start">© 2019-<span class="current-year"></span> <a class="text-primary fw-normal" href="https://themesberg.com" target="_blank">Themesberg</a></p>
48+
<p class="mb-0 text-center text-lg-start">© 2019-<span class="current-year"></span> <a
49+
class="text-primary fw-normal" href="https://themesberg.com" target="_blank">Themesberg &
50+
</a><a href="https://updivision.com/" target="_blank">Updivision</a></p>
4151
</div>
4252
<div class="col-12 col-md-8 col-xl-6 text-center text-lg-start">
4353
<!-- List -->

resources/views/layouts/index/indexfooter.blade.php

Lines changed: 0 additions & 79 deletions
This file was deleted.

resources/views/layouts/index/indexnav.blade.php

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)