35 lines
671 B
PHP
35 lines
671 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Customer;
|
|
use Illuminate\Contracts\View\View;
|
|
|
|
class CustomerController extends Controller
|
|
{
|
|
/**
|
|
* Display a listing of the resource.
|
|
*/
|
|
public function index(): View
|
|
{
|
|
return view('customer.index');
|
|
}
|
|
|
|
/**
|
|
* Show the form for creating a new resource.
|
|
*/
|
|
public function create(): View
|
|
{
|
|
return view('customer.create');
|
|
}
|
|
|
|
|
|
/**
|
|
* Show the form for editing the specified resource.
|
|
*/
|
|
public function edit(Customer $customer): View
|
|
{
|
|
return view('customer.edit', ['customer' => $customer->load(['addresses'])]);
|
|
}
|
|
}
|