LoginAttempt.php 625 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. use App\Models\BaseModel;
  6. class LoginAttempt extends BaseModel
  7. {
  8. use HasFactory;
  9. protected $table = 'login_or_signup_attempt';
  10. public $timestamps = false;
  11. public function getRouteKeyName()
  12. {
  13. return 'uid';
  14. }
  15. public function displayName()
  16. {
  17. if ($this->full_name) return $this->full_name;
  18. if($this->name_first || $this->name_last){
  19. return $this->name_first . ' ' . $this->name_last;
  20. }
  21. return $this->email;
  22. }
  23. }