Send invoices by email.

This commit is contained in:
2025-01-09 11:18:12 +01:00
parent 8da6da471d
commit 6235112f74
19 changed files with 468 additions and 23 deletions

View File

@@ -3,14 +3,14 @@
namespace App\Http\Controllers;
use App\Models\Invoice;
use Illuminate\Http\Request;
use Illuminate\Contracts\View\View;
class InvoiceController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
public function index(): View
{
return view('invoice.index');
}
@@ -18,7 +18,7 @@ class InvoiceController extends Controller
/**
* Show the form for creating a new resource.
*/
public function create()
public function create(): View
{
return view('invoice.create');
}
@@ -26,7 +26,7 @@ class InvoiceController extends Controller
/**
* Display the specified resource.
*/
public function show(Invoice $invoice)
public function show(Invoice $invoice): View
{
return view('invoice.show', ['invoice' => $invoice]);
}
@@ -38,4 +38,14 @@ class InvoiceController extends Controller
{
//
}
/**
* Show the form for sending the specified invoice.
*/
public function mail(int $id): View
{
$invoice = Invoice::find($id);
return view('invoice.mail', ['invoice' => $invoice]);
}
}