• 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.