To count view of your post or url visit use this code
In the controller
public function details($slug){
$post=Post::where('slug',$slug)->first();
$blog_key='blog_'.$post->id;
if(!\Session::has($blog_key)){
$post->increment('view_count');
\Session::put($blog_key,1);
}
$tags=Tag::latest()->get();
$post_random = Post::inRandomOrder()->where('slug', '!=', $slug)->where('status',true)->where('is_approved',true)->limit(3)->get();
return view('frontend.post-details',compact('post','post_random','tags'));
}