@extends('user::layouts.master') @section('content')

Manage Setting Logo

@if(isset($_REQUEST['login']) && $_REQUEST['login'] =1 )
Please change your account password to continue using secure site.
@endif

Theme Options

@csrf
@if($settings->count() > 0 || old('setting')) @php $settings = old('setting') ? (object) old('setting') : $settings; $inc = 0; @endphp @foreach($settings as $k => $setting) @php $inc++ @endphp @endforeach @else @php $inc = 2; @endphp @endif
Constant/Slug Config Value
{{Form::text('setting['.$k.'][slug]', old('setting.'.$k.'.slug') ? old('setting.'.$k.'.slug') : $setting->slug,['class' => 'form-control','readonly' => old('setting.'.$k.'.slug') ? false : true])}}
{{Form::hidden('setting['.$k.'][title]',old('setting.'.$k.'.title') ? old('setting.'.$k.'.title') : $setting->title)}} {{Form::hidden('setting['.$k.'][field_type]',old('setting.'.$k.'.field_type') ? old('setting.'.$k.'.field_type') : $setting->field_type)}} {{Form::hidden('setting['.$k.'][manager]', old('setting.'.$k.'.manager') ? old('setting.'.$k.'.manager') : $setting->manager)}} @php if(old('setting.'.$k.'.id')){ echo Form::hidden('setting['.$k.'][id]',old('setting.'.$k.'.id')); }else if(isset($setting->id)){ echo Form::hidden('setting['.$k.'][id]', $setting->id); } @endphp @if($errors->has('setting.'.$k.'.slug')) {{ $errors->first('setting.'.$k.'.slug') }} @endif
@if (old('setting.'.$k.'.config_value')) @php $filename = old('setting.'.$k.'.config_value'); if(old('setting.'.$k.'.id')) $filepath = '/storage/settings/'; else $filepath = "/storage/temp/"; @endphp @else @php $filename = isset($setting->config_value) ? $setting->config_value : ""; $filepath = '/storage/settings/'; @endphp @endif @if(!empty($filename) && file_exists( public_path() . $filepath . $filename)) @else @endif
@if($errors->has('setting.'.$k.'.config_value')) {{ $errors->first('setting.'.$k.'.config_value') }} @endif
{{Form::text('setting[0][slug]','MAIN_FAVICON',['class' => 'form-control','readonly' =>'readonly'])}}
{{Form::hidden('setting[0][title]','Main Favicon')}} {{Form::hidden('setting[0][field_type]','text')}} {{Form::hidden('setting[0][manager]','theme_images')}}
{{Form::text('setting[1][slug]','MAIN_LOGO',['class' => 'form-control','readonly' =>'readonly'])}}
{{Form::hidden('setting[1][title]','MAIN LOGO')}} {{Form::hidden('setting[1][field_type]','text')}} {{Form::hidden('setting[1][manager]','theme_images')}}

Important Rules

For each config settings that would be added to the system, make sure it has these constant/slug:

  • MAIN_LOGO - Will be replaced by logo from the admin settings.
  • MAIN_FAVICON - Will be replaced by favicon icon image from the admin settings.
@stop @section('per_page_style') @stop @push('scripts') @endpush