@extends('layouts.admin-layout') @section('content') @auth()

Прикрепить файл

{{ Form::open(array('url' => route('files.store'), 'method' => 'POST', 'files'=>'true')) }}
{{ Form::label('url', 'Путь к файлу') }}
{{ Form::file('url', ['class' => 'form-control']) }}
@if ($errors->any()) {{ $errors->first('url') }} @endif
{{ Form::label('name', 'Имя файла') }}
{{ Form::text('name', '', ['class' => 'form-control']) }}
@if ($errors->any()) {{ $errors->first('name') }} @endif
{{ Form::label('position', 'Позиция') }}
{{ Form::text('position', 0, ['class' => 'form-control']) }}
@if ($errors->any()) {{ $errors->first('name') }} @endif
{{ Form::label('idReceptionScreen', 'Пункт экрана приема') }}
{{ Form::select('idReceptionScreen', $receptionScreens, $idReceptionScreen, ['class' => 'form-select']) }}
@if ($errors->any()) {{ $errors->first('idReceptionScreen') }} @endif
{{ Form::submit('Загрузить файл', ['class' => 'btn btn-primary'])}}
{{Form::close()}}
@if($idReceptionScreen !== null)

Файлы пункта Экрана Приема: {{ $receptionScreens[$idReceptionScreen] }}

@foreach($files as $file) @endforeach
Позиция Название
{{ $file->position }} {{ $file->name }}
@endif
@endauth @endsection