UserLastCertify.php
483 Bytes
<?php
namespace App\Models\Views;
use App\Models\UserCertify;
use Awobaz\Compoships\Database\Eloquent\Relations\HasMany;
class UserLastCertify extends UserCertify
{
protected $table = 'user_last_certifies';
/**
* @return \Awobaz\Compoships\Database\Eloquent\Relations\HasMany
*/
public function records(): HasMany
{
return $this->hasMany(UserCertify::class, 'user_id', 'user_id')->where('user_auth_infos.status', '!=', 0)->latest('id');
}
}