develop
Last change
on this file since 507ade0 was c6b84df, checked in by beratkjufliju <kufliju@…>, 3 years ago |
added fileTypes controller, notifications, excel export, edited views
|
-
Property mode
set to
100644
|
File size:
592 bytes
|
Rev | Line | |
---|
[24a616f] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | namespace App\Models;
|
---|
| 4 |
|
---|
| 5 | use Illuminate\Database\Eloquent\Factories\HasFactory;
|
---|
| 6 | use Illuminate\Database\Eloquent\Model;
|
---|
| 7 |
|
---|
[c6b84df] | 8 | class Folder extends Model
|
---|
[24a616f] | 9 | {
|
---|
[e6c1f87] | 10 | use HasFactory;
|
---|
[c6b84df] | 11 | protected $table = "folders";
|
---|
[24a616f] | 12 |
|
---|
[c6b84df] | 13 | protected $fillable = ["arch_id", "name", "description", "location", "user_id", "department_id", "is_important"];
|
---|
[e6c1f87] | 14 |
|
---|
[24a616f] | 15 |
|
---|
| 16 | public function user() {
|
---|
| 17 | return $this->belongsTo(User::class);
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | public function department() {
|
---|
| 21 | return $this->belongsTo(Department::class);
|
---|
| 22 | }
|
---|
| 23 |
|
---|
| 24 | public function files()
|
---|
| 25 | {
|
---|
| 26 | return $this->hasMany(File::class);
|
---|
| 27 | }
|
---|
| 28 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.