mercredi 1 mars 2017

how get views number for my website in laravel 5.1?

my code : but always views number are 1 public function getLandPage() {

    if(is_null(Session::get('views_number'))){
        Session::put('views_number',1);
    }else{
        $c=Session::get('views_number');
        $c++;
        Session::put('views_number',$c);
    }

    return dd( Session::get('views_number'));
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire