海南旅游SAAS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
584 B

4 years ago
4 years ago
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\SoftDeletes;
  5. class Supplier extends BaseModel
  6. {
  7. use HasFactory, SoftDeletes;
  8. public function getLogoAttribute($value): string
  9. {
  10. return $value ? $this->host . $value : '';
  11. }
  12. public function getLicensePicAttribute($value): string
  13. {
  14. return $value ? $this->host . $value : '';
  15. }
  16. //密码修改
  17. public function setPasswordAttribute($value)
  18. {
  19. if (!empty($value)) {
  20. $this->attributes['password'] = password_hash($value, PASSWORD_BCRYPT);
  21. }
  22. }
  23. }