wzq hace 6 años
padre
commit
0c119ed3a2
Se han modificado 1 ficheros con 13 adiciones y 0 borrados
  1. 13 0
      app/Helper/helper.php

+ 13 - 0
app/Helper/helper.php

@@ -15,4 +15,17 @@ if ( ! function_exists('config_path'))
     {
         return app()->basePath() . '/config' . ($path ? '/' . $path : $path);
     }
+}
+
+if (! function_exists('public_path')) {
+    /**
+     * Get the path to the public folder.
+     *
+     * @param  string  $path
+     * @return string
+     */
+    function public_path($path = '')
+    {
+        return app()->make('path.public').($path ? DIRECTORY_SEPARATOR.ltrim($path, DIRECTORY_SEPARATOR) : $path);
+    }
 }