50 lines
1.9 KiB
PHP
50 lines
1.9 KiB
PHP
@extends('layouts.app')
|
|
|
|
@section('title', 'Modifica ' . $customer->name)
|
|
@section('page-title', 'Modifica Cliente')
|
|
|
|
@section('page-actions')
|
|
<a href="{{ route('customers.show', $customer) }}" class="btn btn-outline-secondary">
|
|
<i class="bi bi-arrow-left me-1"></i>Torna al dettaglio
|
|
</a>
|
|
@endsection
|
|
|
|
@section('content')
|
|
|
|
<div class="row justify-content-center">
|
|
<div class="col-lg-10">
|
|
<div class="card">
|
|
<div class="card-header bg-white border-0 pt-4 pb-0 px-4">
|
|
<h5 class="fw-semibold">
|
|
<i class="bi bi-pencil me-2 text-warning"></i>{{ $customer->name }}
|
|
</h5>
|
|
<p class="text-muted small">I campi contrassegnati con * sono obbligatori.</p>
|
|
</div>
|
|
|
|
<div class="card-body p-4">
|
|
{{--
|
|
@method('PUT'): poiché i browser inviano solo GET/POST,
|
|
Laravel "finge" il metodo PUT tramite un campo nascosto _method.
|
|
--}}
|
|
<form method="POST" action="{{ route('customers.update', $customer) }}">
|
|
@csrf
|
|
@method('PUT')
|
|
|
|
@include('customers._form', ['customer' => $customer])
|
|
|
|
<div class="d-flex justify-content-end gap-2 mt-4 pt-3 border-top">
|
|
<a href="{{ route('customers.show', $customer) }}" class="btn btn-outline-secondary">
|
|
Annulla
|
|
</a>
|
|
<button type="submit" class="btn btn-warning">
|
|
<i class="bi bi-check-lg me-1"></i>Salva Modifiche
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@endsection
|