Pass parameter to view using
with
method
public function about() {
        $param1 = 'this is a parameter of about us page';
        return view('pages/about')->with('title', $param1);
}
Content of the blade template
@extends('layouts.app')

@section('cntnt')
    <h3>abt us {{$title}}</h3>
@endsection
by Valeri Tandilashvili
4 years ago
Laravel
blade template
Laravel From Scratch
1
Pro tip: use ```triple backticks around text``` to write in code fences