-
routes/web.php
Open in GitHubuse App\Http\Controllers\AccountController; use Illuminate\Support\Facades\Route; // Route::middleware('auth')->prefix('account')->group(function () { // Route::get('overview', [AccountController::class, 'index'])->name('account.index'); // }); });
-
app/Http/Controllers/AccountController.php
Open in GitHubclass AccountController extends Controller { public function __construct() { $this->middleware('auth'); } public function index() { return view('account.user-account'); } // }
-
resources/views/account/user-account.blade.php
Open in GitHub// @section('content') <div class="account-layoutborder"> <div class="account-hdr bg-primary text-white border "> User Account </div> <div class="account-bdy border py-3"> <div class="row container d-flex justify-content-center"> <div class="col-xl-12 col-md-12"> <div class="card user-card-full"> <div class="row m-l-0 m-r-0"> <div class="col-sm-4 bg-c-lite-green user-profile"> <div class="card-block text-center text-white"> <div class="m-b-25"> <img src="{{asset('images/user-profile.png')}}" class="img-radius" alt="User-Profile-Image"> </div> <h6 class="f-w-600">{{auth()->user()->name}}</h6> @role('user') <p>User</p> @endrole @role('admin') <p>Author (Job Lister) <i class="fas fa-pen-square"></i></p> @endrole </div> </div> <div class="col-sm-8"> <div class="card-block"> <h6 class="m-b-20 p-b-5 b-b-default f-w-600">Information</h6> <div class="row"> <div class="col-sm-6"> <p class="m-b-10 f-w-600">Email</p> <h6 class="text-muted f-w-400">{{auth()->user()->email}}</h6> </div> <div class="col-sm-6"> <p class="m-b-10 f-w-600">Phone</p> <h6 class="text-muted f-w-400">not set</h6> </div> </div> <h6 class="m-b-20 m-t-40 p-b-5 b-b-default f-w-600">Account</h6> <div class="row"> <div class="col-sm-6"> <p class="m-b-10 f-w-600">Password</p> <a href="{{route('account.changePassword')}}" class="btn primary-outline-btn">Change password</a> </div> <div class="col-sm-6"> <p class="m-b-10 f-w-600">Logout</p> <a href="{{route('logout')}}" class="btn btn-outline-dark">Logout</a> </div> </div> <ul class="social-link list-unstyled m-t-40 m-b-10"> <li><a href="#!" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="facebook" data-abc="true"><i class="mdi mdi-facebook feather icon-facebook facebook" aria-hidden="true"></i></a></li> <li><a href="#!" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="twitter" data-abc="true"><i class="mdi mdi-twitter feather icon-twitter twitter" aria-hidden="true"></i></a></li> <li><a href="#!" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="instagram" data-abc="true"><i class="mdi mdi-instagram feather icon-instagram instagram" aria-hidden="true"></i></a></li> </ul> </div> </div> </div> </div> </div> </div> </div> </div> @endSection //