From c1505ec84ce8700636d327d8fa88c066cd6132df Mon Sep 17 00:00:00 2001 From: aslan Date: Wed, 24 Jan 2024 15:41:20 +0300 Subject: [PATCH] add form for ReceptionScreen --- .../Controllers/ReceptionScreenController.php | 5 +- .../admin-reception-screen/index.blade.php | 103 ++++++++++++++---- 2 files changed, 86 insertions(+), 22 deletions(-) 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) + + + + + @if(count($onlineDocument->files) !== 0) + + + + + @else + + + + @endif + @endforeach + +
ПозицияНазваниедействия
{{ $onlineDocument->position }}{{ $onlineDocument->name }}редактировать + + удалить + +
+ + + + + + + + + - - @endforeach - @php - $files = \App\Models\File::all(); - foreach ($files as $file) { - echo ($file); - } - @endphp + @foreach($onlineDocument->files->sortBy('position') as $file) + + + + + + @endforeach + + +
ПозицияИмя Файладействия
{{ $file->position }}{{ $file->name }}редактировать + + удалить + +
+ +
+ Добавить + файл +
+
+
+ + {{ 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