jeudi 25 mai 2017

Laravel 5.0: Route with query string

I am using laravel 5.0, I am sending a query string on A tag with an id. I am getting id but not the query string data

Below is the code: View

<div class="col-xs-12 col-sm-4 col-md-4 col-lg-4">
        <div class="img-decor">
            <a href="" class="">
              <img src="" alt="..." class="img-rounded" width="200">
            </a>
            <div class="deals-title">
            
                <div class="sub-details">Save up to %</div>
            </div>
        </div>

    </div>

Controller

public function buycarddetail($id = null, Request $request)
    {
        echo $id; 
            echo '<pre>'; $data = $request->all(); exit;
        return view('buycarddetail');

    }

Route

Route::get('buycarddetail/{id}', ['as' => 'buycarddetail', 'uses' => 'HomeController@buycarddetail']);

I want to use the query string data for further process on controller Please help



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2qSNgzN
via IFTTT

Aucun commentaire:

Enregistrer un commentaire