Waiters.php 461 B

123456789101112131415161718192021
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Waiters extends Model
  5. {
  6. //
  7. public function users(){
  8. return $this->belongsTo('App\User','user_id','id');
  9. }
  10. public function profiles(){
  11. return $this->hasOne('App\Models\Photos','waiter_id','id')->where('photo_type','profile');
  12. }
  13. public function waiter_tables(){
  14. return $this->hasOne('App\Models\WaiterTables','waiter_id','id');
  15. }
  16. }