Welcome Guest, Not a member yet? Register   Sign In
myth: links in views are displayed wrong
#7

(03-12-2020, 05:07 AM)InsiteFX Wrote: The route_to uses a named route.

See my route for dashboard below, ['as' => 'dashboard']

PHP Code:
$routes->get('dashboard''Admin::dashboard', ['as' => 'dashboard']); 

So my route_to would be in html like below.

PHP Code:
<?= route_to('dashboard'?>
Yes, Lonnie has routes like:

Code:
$routes->get('register', 'AuthController::register', ['as' => 'register']);
The problem is that  when you have the project installed in subfolder (like localhost/my_project) the part "my-project" isn't included in the URI. Even if I have "http://localhost/my-project" it in my baseURL in config/app.php
Reply


Messages In This Thread
RE: myth: links in views are displayed wrong - by muuucho - 03-14-2020, 07:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB