TeamPhoto.php 421 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App\Models;
  3. use Dcat\Admin\Traits\HasDateTimeFormatter;
  4. use Illuminate\Database\Eloquent\Model;
  5. class TeamPhoto extends Model
  6. {
  7. use HasDateTimeFormatter;
  8. protected $table = 'team_photos';
  9. public function user()
  10. {
  11. return $this->belongsTo(User::class, 'user_id', 'id');
  12. }
  13. public function team()
  14. {
  15. return $this->belongsTo(Team::class, 'team_id', 'id');
  16. }
  17. }