public function theblog(Request $req, $slug){ $blog = blog::find($slug);
dd($slug);
DB::table("blogs")->where('slug', "$slug")->increment('views'); return view('myblog',compact('blog')); }
Check if there is value for $blog...if it is null(that is the problem) then you should check you DB?
* Be the first to Make Comment