Hello,
Regarding the code snippets below from a custom module, I can not get my head around this small issue:
The header text for the confirmation view is shown as “texts.confirmation”.
I am wondering how this text is to be set programatically.
Can you help me out.
Best,
Frans.
— EarlController.php —
<?php
namespace Modules\Earl\Http\Controllers;
use Illuminate\Routing\Controller;
use Illuminate\Http\Request;
use DB;
class EarlController extends Controller
{
public function index()
{
return view(‘earl::selectinvoice’);
}
public function show(Request $request)
{
$invoicenumber = $request->invoicenumber;
$invoice = DB::table('invoices')->where('invoice_number', $invoicenumber)->first();
$contact = DB::table('contacts')->where('client_id', $invoice->client_id)->first();
$invoiceitem = DB::table('invoice_items')->where('invoice_id', $invoice->id)->first();
return view('earl::confirmation', [
'invoice' => $invoice,
'contact' => $contact,
'invoiceitem' => $invoiceitem
]);
}
}
— selectinvoice.blade.php —
@extends(‘header’)
@section(‘content’)
<form action=“confirmation”>
Invoice#:<br>
<input type=“text” name=“invoicenumber” value="">
<br>
<input type=“submit” value=“Submit”>
</form>
@stop
— confirmation.blade.php —
@extends(‘header’)
@section(‘content’)
<p>Confirmation</p>
<p>
InvoiceID: {{ $invoice->id }} ContactID: {{ $contact->id }} InvoiceitemID: {{ $invoiceitem->id }} <br>
</p>
… a lot more where this came from …
@stop