@extends('backEnd.master') @section('styles') @endsection @section('mainContent')
@if(isset($editData)) @endif

@if(isset($editData)) @lang('common.edit') @else @lang('common.add') @endif @lang('blog.blog_category')

@if(isset($editData)) {{ Form::open(['class' => 'form-horizontal', 'files' => true, 'url' => route('blog.categories.update',$editData->id), 'method' => 'PUT', 'enctype' => 'multipart/form-data']) }} @else {{ Form::open(['class' => 'form-horizontal add_form', 'files' => true, 'route' => ['blog.categories.store'], 'method' => 'POST', 'enctype' => 'multipart/form-data']) }} @endif
@if ($errors->has('name')) {{ $errors->first('name') }} @endif
@if ($errors->has('parent_id')) {{ $errors->first('parent_id') }} @endif
@php if(permissionCheck('blog.categories.store')){ $tooltipAdd = ""; $disable = ""; }else{ $tooltipAdd = "You have no permission to add"; $disable = "disabled"; } if(permissionCheck('blog.categories.edit')){ $tooltipUpdate = ""; $disable = ""; }else{ $tooltipUpdate = "You have no permission to update"; $disable = "disabled"; } @endphp
@if(isset($editData)) @if (permissionCheck('blog.categories.edit'))
@else
You don't have this permission
@endif @else @if (permissionCheck('blog.categories.store'))
@else
You don't have this permission
@endif @endif
{{ Form::close() }}

@lang('blog.blog_category')

@if(isset($itemCategories)) @php $key = 1; @endphp @foreach($itemCategories as $value) @php $key += 1; @endphp @foreach ($value->childs as $child_account) @include('blog::category.child_category', ['child_account' => $child_account]) @php $key += 1; @endphp @endforeach @endforeach @endif
@lang('common.sl') @lang('common.image') @lang('common.category') @lang('common.action')
{{$key }}
-> {{ $value->name }}
@endsection @push('scripts') @endpush