From e3f398ff84dd036b3838a789918cfa2400407ef5 Mon Sep 17 00:00:00 2001 From: Jonny Barnes Date: Fri, 7 Oct 2016 12:15:17 +0100 Subject: [PATCH] Use the correct place URL format --- app/Services/NoteService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Services/NoteService.php b/app/Services/NoteService.php index 409ff790..cb5bdc10 100644 --- a/app/Services/NoteService.php +++ b/app/Services/NoteService.php @@ -42,9 +42,9 @@ class NoteService if ($place !== null && $place !== 'no-location') { if (substr($place, 0, strlen(config('app.url'))) == config('app.url')) { - //uri of form http://host/place/slug, we want slug so chop off start - //that’s the app’s url plus `/place/` - $slug = mb_substr($place, mb_strlen(config('app.url')) + 7); + //uri of form http://host/places/slug, we want slug so chop off start + //that’s the app’s url plus `/places/` + $slug = mb_substr($place, mb_strlen(config('app.url')) + 8); $placeModel = Place::where('slug', '=', $slug)->first(); $note->place()->associate($placeModel); $note->save();