Account.php 435 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App\Models;
  3. # use Illuminate\Database\Eloquent\Model;
  4. class Account extends Model
  5. {
  6. protected $table = 'account';
  7. public function displayName($_flat = true)
  8. {
  9. $result = '';
  10. if($_flat) {
  11. $result = $this->name_first . ' ' . $this->name_last;
  12. }
  13. else {
  14. $result = $this->name_last . ', ' . $this->name_first;
  15. }
  16. return $result;
  17. }
  18. }