@extends('layouts.master') @section('extracss') {!! Html::style('assets/js/bootstrap-fileupload/bootstrap-fileupload.css') !!} @endsection @section('content') @if(Request::segment(2)==='add-file-storege') {{ Form::open(array('route' => 'save-file-storege', 'class'=> 'form-horizontal','enctype'=>'multipart/form-data', 'files'=>true)) }} @csrf

Add File

{!! Form::select('brand_asset_id', $brandAsset,null, [ 'class' => 'form-control select2 form-select', 'id' => 'select2Primary', 'required' => 'required', ]) !!} @if ($errors->has('brand_asset_id')) {{ $errors->first('brand_asset_id') }} @endif
{!! Form::select('doc_type',[ 'File' => 'File', 'Url' => 'Url' ],'File',array('id'=>'doc_type','class'=> $errors->has('doc_type') ? 'form-control is-invalid state-invalid' : 'form-control', 'onchange'=>'getType(this.value)')) !!} @if ($errors->has('doc_type')) {{ $errors->first('doc_type') }} @endif
{!! Form::file('doc_path',array('id'=>'doc_path','class'=> $errors->has('doc_path') ? 'form-control is-invalid state-invalid' : 'form-control', 'autocomplete'=>'off')) !!} @if ($errors->has('doc_path')) {{ $errors->first('doc_path') }} @endif
{!! Form::text('file_name',null,array('id'=>'file_name','class'=> $errors->has('file_name') ? 'form-control is-invalid state-invalid' : 'form-control', 'placeholder'=>'File Name', 'autocomplete'=>'off', 'required'=>'required')) !!} @if ($errors->has('file_name')) {{ $errors->first('file_name') }} @endif
{{ Form::close() }} @else

File Management

@foreach($files as $key=> $file) @endforeach
# Brand Asset File Name Path Action Doc
{!! $key+1 !!} {!! @$file->brandasset->name!!} {!! $file->file_name !!} {!! $file->doc_path !!}
@endif @endsection @section('extrajs') @endsection