diff --git a/app/Http/Controllers/TracksController.php b/app/Http/Controllers/TracksController.php index e55f447c..e5d41736 100644 --- a/app/Http/Controllers/TracksController.php +++ b/app/Http/Controllers/TracksController.php @@ -85,7 +85,7 @@ class TracksController extends Controller } $parsedUrl = parse_url($request->input('url')); - $id = preg_match('(\d+)', $parsedUrl['path']); + $id = explode('-', explode('/', $parsedUrl['path'])[2])[0]; $track = Track ::whereId($id)