@extends('layouts.app') @section('title', isset($practicalExample) && isset($readonly) && $readonly ? __('labels.view_practical_example') : (isset($practicalExample) ? __('labels.edit_practical_example') : __('labels.create_practical_example'))) @push('pageTitle') {{ __('labels.practical_examples') }} @endpush @section('css') @endsection @section('js') @endsection @section('content') @include('components.common.page-header',[ 'pageTitle' => isset($practicalExample) && isset($readonly) && $readonly ? __('labels.practical_example') : (isset($practicalExample) ? __('labels.edit_practical_example') : __('labels.add_practical_example')), 'actionButton' => [ 'url' => route('practical-examples.index'), 'text' => __('labels.back_to_list') ] ]) @include('components.common.flush-message') @include('components.common.validation-errors') @php $hasImage = isset($practicalExample) && !empty($practicalExample->feature_image_url); $oldImage = old('feature_image', $hasImage ? $practicalExample->feature_image_url : ''); $imageUrl = !empty($oldImage) ? $oldImage : ($hasImage ? $practicalExample->feature_image_url : ''); $title = old('title', isset($practicalExample) ? $practicalExample->title : ''); $introduction = old('introduction', isset($practicalExample) ? $practicalExample->introduction : ''); $description = old('description', isset($practicalExample) ? $practicalExample->description : ''); $sortOrder = old('sort_order', isset($practicalExample) ? $practicalExample->sort_order : 0); $isActive = old('is_active', isset($practicalExample) ? $practicalExample->is_active : true); $practicalExampleId = isset($practicalExample) ? $practicalExample->id : ''; $showImage = !empty($imageUrl); @endphp
@endsection