Vishaal
6 months ago

Route to navtab

Posted 6 months ago by Vishaal

Hello, I want create route for mine navtab menu, that i can load different controller class inside the tabs. But i'm not getting success to get the navtab on url mine url that i can create the route. Can anyone help me what i'm doing wrong or what i need to do to route direct to navtab:

<div class="kt-grid__item kt-grid__item--fluid kt-grid kt-grid--hor">
    <!-- begin:: Subheader -->
    <div class="kt-subheader kt-grid__item" id="kt_subheader">
        <div class="kt-subheader__main">
            <span class="kt-subheader__separator kt-hidden"></span> 
            <div class="kt-subheader__breadcrumbs">
                <a href="#" class="kt-subheader__breadcrumbs-home"><i class="flaticon2-shelter"></i></a>
                <span class="kt-subheader__breadcrumbs-separator"></span> <a href="home" class="kt-subheader__breadcrumbs-link"> Dashboard </a> <span class="kt-subheader__breadcrumbs-separator"></span> <a href="profile" class="kt-subheader__breadcrumbs-link"> Profiel </a>
            </div>
        </div>
    </div>
    <div class="kt-content kt-grid__item kt-grid__item--fluid" id="kt_content">
        <div class="tab-content">
            <div class="tab-pane fade show active" id="kt_tabs_1_1" role="tabpanel">
                <div class="row">
                    <div class="col-lg-4 col-xl-3">
                        <div class="kt-portlet">
                            <div  class="kt-portlet__body kt-portlet__body--fit">
                                <ul class="kt-nav kt-nav--bold kt-nav--md-space kt-nav--v3 kt-margin-t-20 kt-margin-b-20 nav nav-tabs" role="tablist">
                                    <li class="kt-nav__item">
                                        <a class="kt-nav__link active" data-toggle="tab" href="#persoonlijke_informatie">
                                            <span class="kt-nav__link-icon"><i class="flaticon2-user-outline-symbol"></i></span>
                                            <span class="kt-nav__link-text">Persoonlijke informatie</span>
                                        </a>
                                    </li>
                                    <li class="kt-nav__item">
                                        <a class="kt-nav__link" data-toggle="tab" href="#kt_profile_tab_account_information">
                                            <span class="kt-nav__link-icon"><i class="flaticon2-soft-icons-1"></i></span>
                                            <span class="kt-nav__link-text">Account Beveiliging</span> 
                                        </a>
                                    </li>
                                    <li class="kt-nav__item">
                                        <a class="kt-nav__link" data-toggle="tab" href="#wachtwoord_wijzigen">
                                            <span class="kt-nav__link-icon"><i class="flaticon2-lock"></i></span>
                                            <span class="kt-nav__link-text">Wachtwoord wijzigen</span> 
                                        </a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-8 col-xl-9">
                        <div class="tab-content">
                            <div class="tab-pane fade show active" id="persoonlijke_informatie">
                                <div class="kt-portlet">
                                    <div class="kt-portlet__head">
                                        <div class="kt-portlet__head-label">
                                            <h3 class="kt-portlet__head-title"> 
                                                Persoonlijke informatie
                                            </h3>
                                        </div>
                                    </div>
                                    <form class="kt-form kt-form--label-right" method="POST" action="{{ url('updateProfileAanvrager') }}">
                                    @csrf
                                        <div class="kt-portlet__body">
                                            <div class="kt-section kt-section--first">
                                                <div class="kt-section__body">
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">First Name</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input class="form-control" type="text" value="{{ Auth::user()->first_name }}" readonly>
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Last Name</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input class="form-control" type="text" value="{{ Auth::user()->last_name }}" readonly>
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Mobiel Nummer</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input class="form-control" type="text" value="{{ Auth::user()->mobielnummer }}" maxlength="10" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '');" placeholder="0612345678">
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Email Address</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <div class="input-group">
                                                                <div class="input-group-prepend">
                                                                    <span class="input-group-text"><i class="la la-at"></i></span>
                                                                </div>
                                                                <input type="text" class="form-control" value="{{ Auth::user()->email }}" placeholder="Email" aria-describedby="basic-addon1" readonly>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            @if (Auth::check() &&  Auth::user()->hasRole('SuperAdministrator|Administrator|Aanvrager'))
                                            <div class="kt-separator kt-separator--border-dashed kt-separator--portlet-fit kt-separator--space-lg"></div>
                                            <div class="kt-section kt-section--first">
                                                <div class="kt-section__body">
                                                    <div class="row">
                                                        <label class="col-xl-3"></label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <h3 class="kt-section__title kt-section__title-sm">
                                                                @if (session('success'))
                                                                    <div class="alert alert-success">
                                                                        {{ session('success') }}
                                                                    </div>
                                                                @endif
                                                            </h3>
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <label class="col-xl-3"></label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <h3 class="kt-section__title kt-section__title-sm">
                                                                Onderwijsinstelling instelling:
                                                            </h3>
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Faculteit naam</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input class="form-control" id="faculteitnaam" type="text" name="faculteitnaam" value="{{ Auth::user()->faculteit }}">
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Faculteit adres</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input class="form-control" id="facilteitadres" type="text" name="facilteitadres" value="{{ Auth::user()->faculteitadres }}">
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Budget houder</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input class="form-control" id="budgethouder" type="text" name="budgethouder" value="{{ Auth::user()->budgethouder }}">
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Budget nummer</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input class="form-control" id="budgetnummer" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '');" type="text" name="budgetnummer" value="{{ Auth::user()->budgetnummer }}">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            @endif
                                        </div>
                                        @if (Auth::check() &&  Auth::user()->hasRole('SuperAdministrator|Administrator|Aanvrager'))
                                        <div class="kt-portlet__foot">
                                            <div class="kt-form__actions">
                                                <div class="row">
                                                    <div class="col-lg-3 col-xl-3"></div>
                                                    <div class="col-lg-9 col-xl-9">
                                                        <button type="submit" class="btn btn-primary">
                                                            {{ __('Opslaan') }}
                                                        </button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        @endif
                                    </form>
                                </div>
                            </div>
                            <div class="tab-pane fade" id="wachtwoord_wijzigen">
                                <div class="kt-portlet">
                                    <div class="kt-portlet__head">
                                        <div class="kt-portlet__head-label">
                                            <h3 class="kt-portlet__head-title">
                                                Change Password<small>change or reset your account password</small>
                                            </h3>
                                        </div>
                                    </div>
                                    <form class="kt-form kt-form--label-right"  method="POST" action="{{ url('updateProfileChangePassword') }}">
                                        @csrf
                                        <div class="kt-portlet__body">
                                            <div class="kt-section kt-section--first">
                                                <div class="kt-section__body">
                                                    
                                                    <div class="row">
                                                        <label class="col-xl-3"></label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <h3 class="kt-section__title kt-section__title-sm">
                                                                Change Or Recover Your Password:
                                                            </h3>
                                                        </div>
                                                    </div>

                                                    <div class="row">
                                                        <label class="col-xl-3"></label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <h3 class="kt-section__title kt-section__title-sm">
                                                                @if (session('error'))
                                                                    <div class="alert alert-danger">
                                                                        {{ session('error') }}
                                                                    </div>
                                                                @endif
                                                            </h3>
                                                        </div>
                                                    </div>

                                                    <div class="row">
                                                        <label class="col-xl-3"></label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <h3 class="kt-section__title kt-section__title-sm">
                                                                @if (session('success'))
                                                                    <div class="alert alert-success">
                                                                        {{ session('success') }}
                                                                    </div>
                                                                @endif
                                                            </h3>
                                                        </div>
                                                    </div>

                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Current Password</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input id="current-password" type="password" class="form-control" value="" name="current-password" placeholder="New password">
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">New Password</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input id="new-password" type="password" class="form-control" value="" name="new-password" placeholder="Verify password">
                                                        </div>
                                                    </div>
                                                    <div class="form-group row">
                                                        <label class="col-xl-3 col-lg-3 col-form-label">Verify Password</label>
                                                        <div class="col-lg-9 col-xl-6">
                                                            <input id="new-password-confirm" type="password" class="form-control" value="" name="new-password_confirmation" placeholder="Verify password">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="kt-portlet__foot">
                                            <div class="kt-form__actions">
                                                <div class="row">
                                                    <div class="col-lg-3 col-xl-3"></div>
                                                    <div class="col-lg-9 col-xl-9">
                                                        <button type="submit" class="btn btn-primary">
                                                            {{ __('Opslaan') }}
                                                        </button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                </div>
                            </div>
                            <!--end: Change Password -->
                        </div>
                    </div>
                </div>
                <!--end::Row-->
            </div>
        </div>
    </div>
    <!-- end:: Content -->
</div>


<script>
    $(document).ready(function() {
    $('a[data-toggle="tab"]').on('show.bs.tab', function (e) {
      var url = $(this).attr("href"); // the remote url for content
      var target = $(this).data("target"); // the target pane
     } );
</script>

I want create route direct to tab: #wachtwoord_wijzigen how i can let the controller redirect to this tab? if i do profile#wachtwoord_wijzigen its not working.

Can anyone help me with this?

Please sign in or create an account to participate in this conversation.