@extends('superadmin.layout.master') @section('content')
@if(Session::get('errors'))
×
Close
{{Session::get('errors')->first()}}
{!!Session::forget('errors')!!} @endif @if(Session::get('success'))
×
Close
{{Session::get('success')}}
{!!Session::forget('success')!!} @endif
@if(isset($file)) Update @else Add @endif Templete
@csrf
Title
{{$errors->first('name')}}
Category
{{$errors->first('category')}}
--select--
@foreach($catgory as $cat)
subCategory->category->id ==$cat->id) selected @endif>{{ $cat->name}}
@endforeach
Sub-Category
{{$errors->first('scategory')}}
@if(isset($file))
{{$file->subCategory->name}}
@else
--select--
@endif
{{$errors->first('content')}}
@if(isset($file)) @php $view="templates.".$file->subCategory->category->name.".".$file->subCategory->name.".".str_replace(' ','-',$file->name); @endphp @if(view()->exists($view)) {!! view($view) !!} @else <b></b> @endif @endif
@if(isset($file)) Update @else Save @endif
@endsection @section('script') @endsection