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

#5
(07-28-2019, 10:53 AM)InsiteFX Wrote:
PHP Code:
// Config/App.php
public $defaultLocale 'en';

public 
$negotiateLocale true;

// in controller
$locale $this->request->getLocale();

// or
$locale service('request')->getLocale(); 

Uh no, I have in config/App.php all this has long been installed,
but that's what I do not have in the controller so this is this function:

PHP Code:
$locale $this->request->getLocale(); 

in place of it I have this:

PHP Code:
$data = [
 
 'Head' => [
 
    'Lang' => $this->request->getLocale(),
 
    'Title' => 'Authentication'
 
 ],
 
 'Body' => [],
 
 'Foot' => []
];
//  Call vews with data transfer
echo view('templates/header'$data['Head']);
... 
Other code...
// Data cleaning
unset($data); 

In my case, this variable: $data['Head']; Called in

Code:
<html lang="<?= $Lang; ?>">

And when I follow the link from example.com/EN/auth/welcome to example.com/EN/auth/signup
that at me everything is perfectly displayed, but if I in a method "signup" of the controller "Auth" call function "return redirect()->route('Welcome')", and then I update the page, then at me instead of example.com/EN/auth/welcome the browser bar appears example.com/%7Blocale%7D/auth/welcome
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.