How to set header text for a view in a custom module.


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.


— EarlController.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-&gt;invoicenumber;
    $invoice = DB::table('invoices')-&gt;where('invoice_number', $invoicenumber)-&gt;first();
    $contact = DB::table('contacts')-&gt;where('client_id', $invoice-&gt;client_id)-&gt;first();
    $invoiceitem = DB::table('invoice_items')-&gt;where('invoice_id', $invoice-&gt;id)-&gt;first();
    return view('earl::confirmation', [
        'invoice' =&gt; $invoice,
        'contact' =&gt; $contact,
        'invoiceitem' =&gt; $invoiceitem


— selectinvoice.blade.php —



<form action=“confirmation”>
<input type=“text” name=“invoicenumber” value="">
<input type=“submit” value=“Submit”>


— confirmation.blade.php —


InvoiceID: {{ $invoice->id }} ContactID: {{ $contact->id }} InvoiceitemID: {{ $invoiceitem->id }} <br>
… a lot more where this came from …