@extends('promotions.layout') @php $azArray = array(); for ($i = 97; $i <= 122; $i++) { $azArray[chr($i)] = "Value " . chr($i); } // dd($sessionId = session()->getId()); $arrays = Session::get('views') ? Session::get('views') : []; $views = $data->views; // dd($arrays); // Session::put('views', 'value'); if(!in_array($data->id,$arrays)){ array_push($arrays,$data->id); Session::put('views',$arrays); $views = $views + 1; \App\Models\Store::where('id',$data->id)->update(['views' => $views]); } @endphp @section('metatags')
Date: {{ date('d F Y', strtotime($data->created_at)) }}
Views: {{$views}}
{{$data->short_des}}