Ticket.php 497 B

123456789101112131415161718192021
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Model;
  4. class Ticket extends Model {
  5. protected $fillable = [
  6. 'user_id', 'ticketcategory_id', 'ticket_id', 'title', 'priority', 'message', 'status', 'server'
  7. ];
  8. public function ticketcategory(){
  9. return $this->belongsTo(TicketCategory::class);}
  10. public function ticketcomments(){
  11. return $this->hasMany(TicketComment::class);}
  12. public function user(){
  13. return $this->belongsTo(User::class);}
  14. }