question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

route().current() not working for base route

See original GitHub issue

I have a dashboard route defined in Laravel:

Route::get('/')->name('dashboard')->uses('DashboardController@index');

But when I call route().current() on the dashboard page (/), this function returns undefined.

I would have expected dashboard.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
DanielCoulbournecommented, Apr 26, 2019

This should be fixed in the latest build, which I’ll tag today. Screen Shot 2019-04-26 at 5 47 31 PM

0reactions
maxxschocommented, Apr 29, 2019

Works like a charm. Thank you @DanielCoulbourne !

Read more comments on GitHub >

github_iconTop Results From Across the Web

route().current() not working for base route · Issue #200 - GitHub
I have a dashboard route defined in Laravel: Route::get('/')->name('dashboard')->uses('DashboardController@index'); But when I call ...
Read more >
BASE URL Routing not working as intended - laravel
It looks like the urls in the views are hard coded (for example). The fix is the same as this answer, which is...
Read more >
Common Routing Tasks - Angular
The Angular CLI performs this step for you. However, if you are creating an application manually or working with an existing, non-CLI application,...
Read more >
Defining Your Routes - Routing - Ember Guides
Basic Routes. The map() method of your Ember application's router can be invoked to define URL mappings. When calling map() , you should...
Read more >
ASP.NET Core Blazor routing and navigation - Microsoft Learn
These constraints assume that the URL is non-localizable. Route constraints also work with optional parameters. In the following example, Id is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found