0
I have the route below that redirects to the main page of my site..
Route::group(['prefix' =>'site', 'namespace' => 'site'], function(){
Route::get('/', 'SiteController@index')->name('site');
I wanted to add an anchor to the div
services on my site getting like this:
localhost:8000/site#servicos
How do I do it in Laravel?
I’ve tried to:
<a href='{{ route('site') }}#servicos'>Serviços</a>
<a href='#servicos'>Serviços</a>
<a href={{ route('site#servicos') }}'>Serviços</a>
<a href={{ url('site#servicos') }}>'Serviços</a>
<a href=/site#servicos>'Serviços</a>
all change the URL but do not redirect to the div I need, suggestions?
How so an anchor on the route? you want your page to speak one scroll to the other div? That’s it?
– RFL
yes, an anchor on a link.... to go directly to the div that is in the middle of the index in the click...
– Diego Lela
Well, the first item should work. At least in my environment it worked. Are you sure that div has ID?
– Phiter
@Phiter thank you.. killed the problem... forgot the blessed ID!!!!! thank you
– Diego Lela
I was already with the answer ready, rs
– RFL
beginner is fire rs... sometimes I give a flips kkkk
– Diego Lela