i have an array which is like below :
"["events/81.jpg","events/Ancient.2.jpg","events/post.jpg"]"
this is the result of a dd now what i want to do is to change this to a collection with 3 objects so i can loop into that and show it in front end . how can i do that what i tried was like below :
explode(',','$media');
but this brings the [ charachter too so i cant show it in front end . the full result of the dd is as below :
attributes: array:11 [▼
"id" => 1
"title" => "test"
"description" => "<p>test</p>"
"teaser" => "events\December2020\G0SiKVIYomU9SMuuE8ux.jpg"
"media" => "["events/88c7ae4a-8a0a-467f-b09c-0f50206a35eb.jpg","events/Ancient.Aliens.S14E05.480p.Film2Movie_WS.mkv_snapshot_06.45.jpg","events/post.jpg"]"
"price" => 11998
"start_at" => "2020-12-28 00:00:00"
"finish_at" => "2020-12-28 00:00:00"
"is_free" => 1
"created_at" => "2020-12-28 11:15:00"
"updated_at" => "2020-12-28 11:30:41"
]