{{-- * LaraClassifier - Classified Ads Web Application * Copyright (c) BeDigit. All Rights Reserved * * Website: https://laraclassifier.com * Author: Mayeul Akpovi (BeDigit - https://bedigit.com) * * LICENSE * ------- * This software is furnished under a license and may be used and copied * only in accordance with the terms of such license and with the inclusion * of the above copyright notice. If you Purchased from CodeCanyon, * Please read the full License from here - https://codecanyon.net/licenses/standard --}} @extends('layouts.master') @section('wizard') @includeFirst([ config('larapen.core.customizedViewPath') . 'post.createOrEdit.multiSteps.inc.wizard', 'post.createOrEdit.multiSteps.inc.wizard' ]) @endsection @php $nextStepUrl ??= '/'; $post ??= []; /* The Next Step URL */ $nextStepUrl = urlQuery($nextStepUrl) ->setParameters(request()->only(['package'])) ->toString(); $picturesLimit ??= 0; $picturesLimit = is_numeric($picturesLimit) ? $picturesLimit : 0; $picturesLimit = ($picturesLimit > 0) ? $picturesLimit : 1; // Get the listing pictures (by applying the picture limit) $pictures = data_get($post, 'pictures', []); $pictures = collect($pictures)->slice(0, $picturesLimit)->all(); $fiTheme = config('larapen.core.fileinput.theme', 'bs5'); $serverAllowedImageFormatsJson = collect(getServerAllowedImageFormats())->toJson(); $authUser = auth()->check() ? auth()->user() : null; @endphp @section('content') @includeFirst([config('larapen.core.customizedViewPath') . 'common.spacer', 'common.spacer'])
@includeFirst([config('larapen.core.customizedViewPath') . 'post.inc.notification', 'post.inc.notification'])

{{ t('Photos') }} @php try { if (!empty($authUser)) { if (doesUserHavePermission($authUser, \App\Models\Permission::getStaffPermissions())) { $postLink = '- ' . str(data_get($post, 'title'))->limit(45) . ''; echo $postLink; } } } catch (\Throwable $e) {} @endphp

{!! csrf_field() !!}
@if (isset($picturesLimit) && is_numeric($picturesLimit) && $picturesLimit > 0) {{-- pictures --}} @php $picturesError = (isset($errors) && $errors->has('pictures')) ? ' is-invalid' : ''; @endphp
{{ t('pictures') }}
@php $pictureHint = t('add_up_to_x_pictures_text', ['pictures_number' => $picturesLimit]) . '
' . t('file_types', ['file_types' => getAllowedFileFormatsHint('image')]); @endphp {!! $pictureHint !!}
@endif {{-- button --}}
@endsection @section('after_styles') @if (config('lang.direction') == 'rtl') @endif @if (str_starts_with($fiTheme, 'explorer')) @endif @endsection @php $postId = data_get($post, 'id'); /* Get Upload Url */ $uploadUrl = url('posts/' . data_get($post, 'id') . '/photos/'); $uploadUrl = urlQuery($uploadUrl) ->setParameters(request()->only(['package'])) ->toString(); @endphp @section('after_scripts') @include('post.createOrEdit.multiSteps.photos.inc.message-alert-js') @endsection