如何通过<a href="{{ url(&#39;/activity&#39;, $result-&gt;ID) }}">

时间:2019-05-04 10:09:39

标签: php laravel

I'm creating a web app where i can send information to a specific user. And those information sent by the other users can be seen in pending. What i want to achieve is the URL would look like this (below) so i can bookmark the URL.

My original URL is myexample.com/activity

and when I click a message, it would look like this myexample.com/activity/81

What i want is, everytime i open a message sent by the other user, the URL would change something like.

myexample.com/activity/60 or myexample.com/activity/64

Everytime the ID is change at the path of the URL, it will retrieve the information from the database. But i really don't have an idea how. I'm new to web development and I'm studying on my own. Please respect and help me please.

Heres my anchor tag.

 <a id="openPending" href="{{ url('/activity', $result->ID) }}">
        Message1
 </a>
 <a id="openPending" href="{{ url('/activity', $result->ID) }}">
        Message2
 </a>

0 个答案:

没有答案