• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
This is a bug or feature ?

#3
(07-28-2019, 07:52 AM)MGatner Wrote: Docs state:

“ {locale} cannot be used as a placeholder or other part of the route, as it is reserved for use in localization.”

So my guess is that the explicit reference is bugging the named route. Not sure how to accomplish what you’re after other than leaving out the group maybe?

Ref https://codeigniter4.github.io/CodeIgnit...aceholders

I don't quite understand, then it turns out this section (which you refer to) contradicts that:
{locale} in routes

How can I then implement such a system:
I have a variable:
$baseLocale = 'en';
$supportedLocales = ['en', 'ru'];

and I want to have routes like:
https://example.com/(EN or RU)/auth/(SignIN or SignUP)/

But so that these routes were logically linked using groups, like in my example above...

now I have here such code at myself in the file of a route.PHP:

PHP Code:
$routes->group('{locale}', function($routes) {
 
 //  Auth system
 
 $routes->group('auth', function($routes) {
 
    $routes->add('welcome''AuthController::welcome');
 
    $routes->add('signup''AuthController::s_up');
 
    $routes->add('signin''AuthController::s_in');
 
 });
 
 //  Other system  =====-->
}); 
I would change this world, but God doesn't give me the source.
Reply


Messages In This Thread
This is a bug or feature ? - by Digital_Wolf - 07-26-2019, 02:11 AM
RE: This is a bug or feature ? - by MGatner - 07-28-2019, 07:52 AM
RE: This is a bug or feature ? - by Digital_Wolf - 07-28-2019, 09:55 AM
RE: This is a bug or feature ? - by InsiteFX - 07-28-2019, 10:53 AM
RE: This is a bug or feature ? - by Digital_Wolf - 07-28-2019, 11:30 AM
RE: This is a bug or feature ? - by Digital_Wolf - 07-28-2019, 12:03 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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