Skip to content

Commit dad5497

Browse files
committed
User profile and link back to crm
1 parent 728161e commit dad5497

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed

resources/views/layouts/app.blade.php

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,7 @@
5151
</li>
5252
@endif
5353
@else
54-
<li class="nav-item dropdown">
55-
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
56-
{{ Auth::user()->name }} <span class="caret"></span>
57-
</a>
58-
59-
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
60-
<a class="dropdown-item" href="{{ route('laravel-crm.logout') }}"
61-
onclick="event.preventDefault();
62-
document.getElementById('logout-form').submit();">
63-
{{ __('Logout') }}
64-
</a>
65-
66-
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
67-
@csrf
68-
</form>
69-
</div>
70-
</li>
54+
@include('laravel-crm::layouts.partials.nav-user')
7155
@endguest
7256
</ul>
7357
</div>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<li class="nav-item dropdown">
2+
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
3+
{{ Auth::user()->name }} <span class="caret"></span>
4+
</a>
5+
6+
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
7+
@if(Route::has('profile.edit'))
8+
<a class="dropdown-item" href="{{ route('profile.edit') }}">{{ __('Profile') }}</a>
9+
@endif
10+
<a class="dropdown-item" href="{{ route('laravel-crm.logout') }}"
11+
onclick="event.preventDefault();
12+
document.getElementById('logout-form').submit();">
13+
{{ __('Logout') }}
14+
</a>
15+
16+
<form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
17+
@csrf
18+
</form>
19+
</div>
20+
</li>

src/Console/LaravelCrmInstall.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function handle()
7575
$this->info('Checking requirements...');
7676

7777
$this->info('Checking user authentication...');
78-
if (class_exists('App\Models\User') || class_exists('App\User')) {
78+
if (! class_exists('App\Models\User') && ! class_exists('App\User')) {
7979
$this->error('Laravel CRM requires the user model, See https://laravel.com/docs/authentication');
8080

8181
return;

0 commit comments

Comments
 (0)