use Illuminate\Http\Request;class InsertController extends Controller{ public function display() { } public function add(Request $request) { add::display(Request::all()); }}
I'm wrong, apparently. Because when I submit my form, I get this error:
Class 'App\Http\Controllers\add' not found
What am I doing wrong? And am I right in assuming that this code:
add::display(Request::all());
...is going to submit my data and then grab the "display" method and show that page?
I'm a mess...
Straighten me out, please...
LaravelPHP
Last Comment
Bruce Gust
8/22/2022 - Mon
Julian Hansen
Why is Add extending model? Surely it should be extending Controllers?
Bruce Gust
ASKER
Julian, I'm working through some tutorials which is why what I'm about to say may make you think I've got monkeys flying out of my nose.
My thought was that on line #12 of my InsertController.php...
add::display(Request::all());
..."add" was referring to my "add.php" Model. Some of this syntax is still fresh out of the box for me, so I'm not yet confident in the flow of things, but is that right and does that relate at all to what you're asking above?