ID detection should work better now

This commit is contained in:
Josef Citrine 2016-11-30 22:08:40 +00:00
parent 2dd6c663ff
commit 3aacb5f87c

View file

@ -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)