Ticket.php 471 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Ticket extends Model
  5. {
  6. protected $table = "ticket";
  7. protected $guarded=['id'];
  8. function user()
  9. {
  10. return $this->belongsTo('App\User','client_id','id');
  11. }
  12. function created_user()
  13. {
  14. return $this->belongsTo('App\User','created_by','id');
  15. }
  16. function service()
  17. {
  18. return $this->belongsTo('App\Models\ServiceList','service_id','id');
  19. }
  20. }