mercredi 16 juin 2021

Add the user ID on the URL

I'm trying to pass a user id on the URL. Once I click on the icon, it should redirect to a specific page with datatables. enter image description here

and I should see the ID appended on the url enter image description here

Here are my codes, JS, controller and route. But it won't work.

 <a class="btn btn-link btn-success btn-just-icon btn-round" href="" title="SMS History">
                    <i class="material-icons">sms</i>
                    <div class="ripple-container"></div>
                </a>

controller:

public function getView($id)
{


    $smshistory = SmsOutboundsHistory::find($id);

    return view('pages.sms-history')->withSmshistory($smshistory); }

Route: Route::get('/pages/history/{id}', 'HistoryController@getView');



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire