diff --git a/app/Http/Controllers/ReceptionScreenController.php b/app/Http/Controllers/ReceptionScreenController.php
index 2190d67..4400e0d 100644
--- a/app/Http/Controllers/ReceptionScreenController.php
+++ b/app/Http/Controllers/ReceptionScreenController.php
@@ -18,13 +18,12 @@ class ReceptionScreenController extends Controller
return view('admin-reception-screen.index', compact('onlineDocuments'));
}
- public function create(ReceptionScreen $documentOnline): View
+ public function create(): View
{
if (Auth::guest()) {
abort(403);
}
- $parent = $documentOnline;
- return view('admin-reception-screen', compact('parent'));
+ return view('admin-reception-screen.create');
}
public function store(StoreReceptionScreenRequest $request)
diff --git a/resources/views/admin-reception-screen/index.blade.php b/resources/views/admin-reception-screen/index.blade.php
index 2be2521..540119b 100644
--- a/resources/views/admin-reception-screen/index.blade.php
+++ b/resources/views/admin-reception-screen/index.blade.php
@@ -1,23 +1,88 @@
@extends('layouts.admin-layout')
@section('content')
- @foreach($onlineDocuments as $onlineDocument)
-
- {{ $onlineDocument->name }}
- {{ $onlineDocument->id }}
- {{ $onlineDocument->position }}
- @foreach($onlineDocument->files as $file)
-
- {{ $file->name }}
- {{ $file->url }}
-
- @endforeach
+
+
Экран Приема
+
+
Создать пункт Экрана приема
+
+
+
+
+
+ Позиция |
+ Название |
+ действия |
+
+
+
+ @foreach($onlineDocuments as $onlineDocument)
+
+ {{ $onlineDocument->position }} |
+ {{ $onlineDocument->name }} |
+ редактировать
+
+ удалить
+
+ |
+ @if(count($onlineDocument->files) !== 0)
+
+
+
+
+
+
+ Позиция |
+ Имя Файла |
+ действия |
+
+
+
-
- @endforeach
- @php
- $files = \App\Models\File::all();
- foreach ($files as $file) {
- echo ($file);
- }
- @endphp
+ @foreach($onlineDocument->files->sortBy('position') as $file)
+
+ {{ $file->position }} |
+ {{ $file->name }} |
+ редактировать
+
+ удалить
+
+ |
+
+ @endforeach
+
+
+
+
+ |
+
+ @else
+
+
+ Добавить
+ файл
+ |
+
+ @endif
+ @endforeach
+
+
+
+
+
+ {{ Form::open(array('url' => route('uploadfile'), 'method' => 'POST', 'files'=>'true')) }}
+ Select the file to upload.
+ {{ Form::file('image') }}
+ {{ Form::submit('Upload File')}}
+ {{Form::close()}}
+
@endsection