Redirect auf eine bestimmte Registerkarte in Laravel

Ich habe eine index-Ansicht mit 5 tabs. Wenn ich auf Hardware tab, das ist, was ich sehe.

Redirect auf eine bestimmte Registerkarte in Laravel

Wenn Sie klicken Sie auf erstellen, dann starte ich diese Modalen

Redirect auf eine bestimmte Registerkarte in Laravel

Sobald ich senden, bekam ich eine Meldung, und alles ist Shop in Ordnung.

Redirect auf eine bestimmte Registerkarte in Laravel

Aber es mir direkt an meinem ersten tab.
Wie kann ich die Umleitung wieder zu meiner zweiten tab ?


- Store-Funktion

public function store() {

        $inputs = Input::all();
        unset($inputs['_token']);


        $cpe_mac = $inputs['mac1'].$inputs['mac2'].$inputs['mac3'].$inputs['mac4'].$inputs['mac5'].$inputs['mac6'];

        $cpe = [];

        $cpe['cpe_mac'] = $cpe_mac;
        $cpe['bandwidth_max_up'] = (int)$inputs['max_up'];
        $cpe['bandwidth_max_down'] = (int)$inputs['max_down'];

        $json = json_encode($cpe);

        $url = 'http://172.16.139.129:1234/vse/vcpe';
        $ch = curl_init($url);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
        curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        $result = curl_exec($ch);
        curl_close($ch);


        $result_json =  json_decode($result, true);

        $id = $inputs['account_id'];


        if ( $result_json['status'] == '200') {
        return Redirect::to('/account/'.$id.'/#hardware') ->with('success','The CPE was created succesfully!');
    } else {
        return Redirect::to('/account/'.$id.'/#hardware') ->with('error', $result_json['message']);
    }

    } 

Tab.blade.php

<!-- Nav tabs -->
  <ul class="nav nav-tabs">
    <li class=""><a href="#details" data-toggle="tab"><strong>Details</strong></a></li>
    <li class=""><a href="#hardware" data-toggle="tab"><strong>Hardware(s)</strong></a></li>
    <li class=""><a href="#access-methods" data-toggle="tab"><strong>Access Methods</strong></a></li>
    <li class=""><a href="#linked-networks" data-toggle="tab"><strong>Linked Networks</strong></a></li>
    <li class=""><a href="#options" data-toggle="tab"><strong>Options</strong></a></li>
  </ul>

  <!-- Tab panes -->
  <div class="tab-content mb30">

    @include('account.show.details')
    @include('account.show.hardwares')
    @include('account.show.access-methods')
    @include('account.show.linked-networks')
    @include('account.show.options')

  </div>
  • werden diese Registerkarten von bootstrap-framework?
  • Speichern der zuletzt geöffneten Registerkarte auf den Keks und dann diesen Wert verwenden, um es zu öffnen auf neu laden. Die einfachste Art und Weise.
  • Erlauben Sie mir zeigen, zeigen, tun Sie es in der Beantwortung dieser post ?
  • Prashank : ja, das sind Sie.
InformationsquelleAutor kyo | 2015-11-17
Schreibe einen Kommentar