Missing required parameters for route, multiple parameter statement - development

Missing required parameters for route, multiple parameter statement

I have encountered a problem, it seems i’m missing ‘slug’from the link, if i put in that $slug i get an undefined variable, any ideas on how i should define the slug in that button?
Missing required parameters for [Route: thread.show] [URI: forum/{slug}/t={id}].

Controller:

 public function show($slug)
    {
        //
        $forum = Forum::where('slug', '=', $slug)->first();
        $thread = Thread::all()->sortBy('created_at');
    return view('forum.show')->with('forum', $forum)->withThread($thread);
}

view:

           @foreach($forum->threads as $threads)
            <a href=""><p></p></a>
           @endforeach



from Laravel Questions and Answers https://laravelquestions.com/laravel/missing-required-parameters-for-route-multiple-parameter-statement/
via Lzo Media

Comments

Popular posts from this blog

ng-show doesn’t work correct with value boolean

Using PHP and MySQL data to generate PDF letters like in MS Word mailmerge functionality - development

ng-include of inline SVG does not display gradient except in Chrome