adinugro
(Adinugro)
December 1, 2018, 1:28am
1
Dear all,
I made a POS app with multi store feature. I want each store can login using parameterized login page like
http://mypos-app.com/amstore or
http://mypos-app.com/idstore
both pages actually serve by SiteController/index.php. the amstore and idstore will become the variable to differentiate to which the store will be the active store.
Can someone help?
alirz23
(Ali Raza)
December 1, 2018, 6:29am
2
enable pretty urls urlManager config/web.php
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'<storeId:[\w+]>' => 'site/index',
'<controller:\w+>/<action:\w+>' => '<controller>/<action>'
],
]
// controller action index
public function indexAction($actionId)
{
echo $actionId;
}