I have created following controller:
class ControllerCommonTestSMS extends Controller
{
function index()
{
// action
}
}
But if I add the following line, it throws an error that the function is undefined:
$this->customer->isLogged();
class ControllerCommonTestSMS extends Controller
{
function index()
{
if (!$this->customer->isLogged()) {
//code to be execu
}
}
}
this is working fine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.