diff --git a/app/Models/Filearea.php b/app/Models/Filearea.php index 68bac9d..c291eec 100644 --- a/app/Models/Filearea.php +++ b/app/Models/Filearea.php @@ -31,4 +31,9 @@ class Filearea extends Model { return $this->belongsTo(Domain::class); } + + public function files() + { + return $this->hasMany(File::class); + } } \ No newline at end of file diff --git a/resources/views/filearea/addedit.blade.php b/resources/views/filearea/addedit.blade.php index 29335c4..7318e3d 100644 --- a/resources/views/filearea/addedit.blade.php +++ b/resources/views/filearea/addedit.blade.php @@ -150,5 +150,61 @@ + +
+
+ @if ($o->files->count()) + + + + + + + + + + + + + @foreach ($o->files as $oo) + + + + + + + + @endforeach + +
IDFileSizeHatchedDescription
{{ $oo->id }}{{ $oo->name }}{{ number_format($oo->size) }}{{ $oo->datetime->format('Y-m-d H:i:s') }}{{ $oo->desc }}
+ @else +

No files yet in this area.

+ @endif +
+
-@endsection \ No newline at end of file +@endsection + +@section('page-css') + @css('datatables') +@append + +@section('page-scripts') + @js('datatables') + + +@append \ No newline at end of file