So I want to return some string from model
and controller
but it always says undefined variable, although when I use When checked with dd($ it successfully passes a)
and dd($b)
. What did i do wrong?
about.blade:
@extends('layout.template'); @section('homeContainer');{{ $a }}
{{ $b }}
@endsection
About the controller:
About the model:
Directions:
AboutController::info(), ]); });
The controller never runs, only the callbacks in the web.php file. This means you don't have a and b variables, only a name variable
thank you for your reply! Turns out I mistakenly declared the model as a variable and a route,
For the route I changed it to
For controllers and models I remove the static and change the model declaration
Controller:
model: