@extends('layouts.admin') @section('content')
{{--
--}} @if(isset($social))
{{ __("Edit Social Icon")}}
{!! Form::model($social, ['method' => 'PATCH', 'route' => ['admin.social.update', $social->id]]) !!} @else
{{ __("Add Social Icon")}}
{!! Form::open(['method' => 'POST', 'route' => 'admin.social.store']) !!} @endif
{!! Form::label('title', 'Social Title') !!} {!! Form::text('title', null, ['class' => 'form-control']) !!} {{ $errors->first('title') }}
{!! Form::label('icon', 'Social Symbol') !!}

{{ __("- Please select social symbol")}}

{!! Form::text('icon', null, ['class' => 'form-control social-icon-picker','autocomplete' => 'off']) !!}
{{ $errors->first('icon') }}
{!! Form::label('url', 'Social Url') !!} {!! Form::text('url', null, ['class' => 'form-control']) !!} {{ $errors->first('url') }}
{!! Form::label('status', 'Active status') !!}
{!! Form::checkbox('status', 1, isset($settings['status']) ? $settings['status'] : 1, ['id'=>'socialstatus', 'class' => 'custom-control-input']) !!}
{{ $errors->first('status') }}
@if(isset($social)) @else @endif
{!! Form::close() !!}
{{ __("All Social Icons")}}
@if ($all_social) @foreach ($all_social as $key => $item) @endforeach @endif
{{ __("#")}} {{ __("Social Name")}} {{ __("Social Icon")}} {{ __("Social Url")}} {{ __("Status")}} {{ __("Actions")}}
{{ filter_var($key+1)}} {{ filter_var($item->title)}} {{ filter_var($item->url)}} @can('socialicon-edit') {!! Form::open(['method' => 'POST', 'route' => ['social.status', $item->id]]) !!}
{!! Form::checkbox('status', 1, $item->status == 1 ? 1 : 0, ['id' => 'switch'.$item->id, 'class' => 'custom-control-input', 'onChange'=>"this.form.submit()"]) !!}
{!! Form::close() !!} @else @if($item->status == 1) {{ __("Active")}} @else {{ __("Inactive")}} @endif @endcan
@can('socialicon-edit') @endcan @can('socialicon-delete') @endcan
@endsection