form.blade.php 1.94 KB
<?php
use Illuminate\Support\Facades\Storage;
?>
@csrf

@isset($project)
    @method('PUT')
@endisset

<label class="form__label" for="title">Заголовок
    <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span>
</label><br>
@error('title')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input class="form-input " type="text" id="title" name="title" placeholder="Введите заголовок" required value="{{ old('title') ?? $project->title ?? '' }}"><br><br>

<label class="form__label" for="customer">Заказчик
    <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span>
</label><br>
@error('customer')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input class="form-input " type="text" id="customer" name="customer" placeholder="Введите заказчика" required value="{{ old('customer') ?? $project->customer ?? '' }}"><br><br>

<label class="form__label" for="date_project">Дата сдачи проекта
    <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span>
</label><br>
@error('date_project')
<div class="alert alert-danger">{{ $message }}</div>
@enderror
<input class="form-input " type="text" id="date_project" name="date_project" placeholder="Введите дату" required value="{{ old('date_project') ?? $project->date_project ?? '' }}"><br><br>

<label class="form__label" for="image">Картинка
    <span class="auth-mail-error auth-mail-error--hidden">Ошибка</span>
</label><br>
<input type="file" class="form-input form-control-file " name="image" id="image" accept="image/png, image/jpeg">
@isset($project->image)
    <div class="form-group form-check">
        <img src="<?=asset(Storage::url($project->image))?>" width="100px"/>
    </div>
@endisset

<<div class="parts-content-form-bottom modal-auth-bottom">
    <button class="parts-content-form-bottom__button" type="submit">Сохранить</button>
</div>