An error is reported by the static method of the TP5.1 invocation model

<?php
namespace app\index\Model;
use think\Model;
class User extends Model
{    
     public static function maxid(){
         return $this->max("id");
     }
}
use app\index\model\User;
User::maxid();

then why did you report this wrong when using this static method in the controller? What"s wrong?

Mar.09,2021

static methods can use this?? Basic knowledge fails

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b9ea31-2f435.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b9ea31-2f435.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?