<?php
use app\common\controller\Base;
use app\common\validate\User;
use app\common\model\ User as UserModel;
class Test extends Base
{
public function test1(){
return $this-fetch ();
}
}
When the constructor is introduced, the template cannot be exported. Although it can be exported using the view function, many methods of the controller class cannot be used. , is there any good solution
风行者2018-09-17 03:44:30
I have never used tp.
But remember to use parent::__construct() to inherit the parent class constructor for the subclass constructor