Browse Source

simplify with ternary shortcut.

Taylor Otwell 13 years ago
parent
commit
0e66517ec9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      laravel/uri.php

+ 1 - 1
laravel/uri.php

@@ -96,7 +96,7 @@ class URI {
 			$uri = static::remove($uri, $index);
 		}
 
-		return (($uri = trim($uri, '/')) !== '') ? $uri : '/';
+		return trim($uri, '/') ?: '/';
 	}
 
 	/**