@@ -13,9 +13,9 @@ |
||
| 13 | 13 | { |
| 14 | 14 | $path = strtolower($request->path); |
| 15 | 15 | |
| 16 | - $url = Url::whereRaw('lower(path) like (?)',["%{$path}%"])->where(['active' => 1])->first(); |
|
| 16 | + $url = Url::whereRaw('lower(path) like (?)', ["%{$path}%"])->where(['active' => 1])->first(); |
|
| 17 | 17 | |
| 18 | - if (! $url) { |
|
| 18 | + if (!$url) { |
|
| 19 | 19 | return redirect('/'); |
| 20 | 20 | } |
| 21 | 21 | |
@@ -52,9 +52,9 @@ |
||
| 52 | 52 | { |
| 53 | 53 | $path = strtolower($path); |
| 54 | 54 | |
| 55 | - $url = DB::table('urls')->whereRaw('lower(path) like (?)',["%{$path}%"])->count(); |
|
| 55 | + $url = DB::table('urls')->whereRaw('lower(path) like (?)', ["%{$path}%"])->count(); |
|
| 56 | 56 | |
| 57 | - if($url) { |
|
| 57 | + if ($url) { |
|
| 58 | 58 | throw ValidationException::withMessages([ |
| 59 | 59 | 'path' => [__('The path has already been taken.')], |
| 60 | 60 | ]); |