52 lines
1.0 KiB
PHP
52 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Models\Invoice;
|
|
use Illuminate\Contracts\View\View;
|
|
|
|
class InvoiceController extends Controller
|
|
{
|
|
/**
|
|
* Display a listing of the resource.
|
|
*/
|
|
public function index(): View
|
|
{
|
|
return view('invoice.index');
|
|
}
|
|
|
|
/**
|
|
* Show the form for creating a new resource.
|
|
*/
|
|
public function create(): View
|
|
{
|
|
return view('invoice.create');
|
|
}
|
|
|
|
/**
|
|
* Display the specified resource.
|
|
*/
|
|
public function show(Invoice $invoice): View
|
|
{
|
|
return view('invoice.show', ['invoice' => $invoice]);
|
|
}
|
|
|
|
/**
|
|
* Show the form for editing the specified resource.
|
|
*/
|
|
public function edit(Invoice $invoice): View
|
|
{
|
|
return view('invoice.edit', ['invoice' => $invoice]);
|
|
}
|
|
|
|
/**
|
|
* Show the form for sending the specified invoice.
|
|
*/
|
|
public function mail(int $id): View
|
|
{
|
|
$invoice = Invoice::find($id);
|
|
|
|
return view('invoice.mail', ['invoice' => $invoice]);
|
|
}
|
|
}
|