Hello Guys, I want to use the following code on the login page, but I tried to do it with hook, but I could not.
<div class="form-group">
<label for="country">{$LANG.clientareacountry}: <span class="required">*</span></label>
<select id="country" name="country" class="form-control">
{foreach $clientcountries as $countryCode => $countryName}
<option value="{$country}"{if (!$clientcountry && $countryCode eq $defaultCountry) || ($countryCode eq $clientcountry)} selected="selected"{/if}>
{$country}
</option>
{/foreach}
</select>
</div>
Hook I try to do
<?php
use Illuminate\Database\Capsule\Manager as Capsule;
function hook_country($vars){
$client = Menu::context('client');
return array("country" => $client->country);
}
add_hook('ClientLogin',1, 'hook_country');
I'm happy if you help me.