We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d9e28dc commit af3a651Copy full SHA for af3a651
src/Illuminate/Foundation/Application.php
@@ -486,6 +486,21 @@ public function resourcePath($path = '')
486
return $this->basePath.DIRECTORY_SEPARATOR.'resources'.($path ? DIRECTORY_SEPARATOR.$path : $path);
487
}
488
489
+ /**
490
+ * Get the path to the views directory.
491
+ *
492
+ * This method returns the first configured path in the array of view paths.
493
494
+ * @param string $path
495
+ * @return string
496
+ */
497
+ public function viewPath($path = '')
498
+ {
499
+ $basePath = $this['config']->get('view.paths')[0];
500
+
501
+ return rtrim($basePath, DIRECTORY_SEPARATOR).($path ? DIRECTORY_SEPARATOR.$path : $path);
502
+ }
503
504
/**
505
* Get the path to the environment file directory.
506
*
0 commit comments