I'm creating a project using Laravel 8, I've created a map using OpenLayers, the map has "points" (or features), each point has a name that's been determined, and every time I click on one of them When I click, a popup appears showing the name of the point and a link that should take me to another page showing more information, the part of the code that gave me the problem is this:
if(feature){ var text = feature.get('name'); content.innerHTML = text ' ' '{{ __('Ver menú') }}>'; }else{ content.innerHTML = ''; }
It threw me this error:
Use of undefined constant text - assuming 'text' (this will throw an error in a future PHP version)
So I'm assuming I can't pass variables like that but I don't know how, here is the route I defined:
Route::get('/local/{nombre}', 'LocalController@index')->name('local'); pre>This is the code for the controller:
middleware('auth'); } /*** Show the application dashboard. * * @return IlluminateContractsSupportRenderable*/ public function index($nombre) { return view('local', ['nombre' => $nombre]); }}
Thank you very much for any advice/tips/information in advance (also, if the code looks a bit messy here, sorry, I'm a newbie and don't know how to give it a proper style, hehe)< /p>
I think the problem with this part is thetext
It should be like this
Hope it helps you