Ignore:
Timestamp:
10/13/21 15:44:57 (3 years ago)
Author:
Berat Kjufliju <kufliju@…>
Branches:
develop, master
Children:
120759b
Parents:
194a359
Message:

added documents crud, added last_seen_to_user, edited views

File:
1 edited

Legend:

Unmodified
Added
Removed
  • app/Models/Department.php

    r194a359 r24a616f  
    33namespace App\Models;
    44
     5use Illuminate\Database\Eloquent\Factories\HasFactory;
    56use Illuminate\Database\Eloquent\Model;
    67use Illuminate\Notifications\Notifiable;
     
    910{
    1011    use Notifiable;
     12    use HasFactory;
    1113
    1214    protected $table = "departments";
    1315
    14     protected $fillable = ["name", "code", "user_id"];
     16    protected $fillable = ["name", "code", "location", "user_id"];
    1517
    1618    protected $casts = [
     
    2224        return User::where('id', $this->user_id)->pluck('username')->first();
    2325    }
     26
     27    public function document(){
     28        return $this->hasMany(Document::class);
     29    }
    2430}
Note: See TracChangeset for help on using the changeset viewer.