File tree Expand file tree Collapse file tree 4 files changed +48
-0
lines changed Expand file tree Collapse file tree 4 files changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ .idea
2+ /vendor /
3+ composer.lock
Original file line number Diff line number Diff line change 1+ # Laravel Generator Helpers
2+
3+ This repo contains common helper functions which are used in different InfyOm laravel generator packages.
4+
5+ This can be useful to other packages as well.
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " infyomlabs/laravel-generator-helpers" ,
3+ "description" : " Helper functions for laravel generator packages" ,
4+ "type" : " library" ,
5+ "license" : " MIT" ,
6+ "authors" : [
7+ {
8+ "name" : " Mitul Golakiya" ,
9+ "email" : " me@mitul.me"
10+ }
11+ ],
12+ "require" : {
13+ "php" : " ^7.2.5" ,
14+ "illuminate/support" : " ^7.0"
15+ },
16+ "autoload" : {
17+ "psr-4" : {
18+ "InfyOm\\ GeneratorHelpers\\ " : " src/"
19+ }
20+ }
21+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace InfyOm \GeneratorHelpers ;
4+
5+ class LaravelUtils
6+ {
7+ /**
8+ * Get full view path relative to the application's configured view path.
9+ *
10+ * @param string $path
11+ * @return string
12+ */
13+ public static function getViewPath ($ path = '' )
14+ {
15+ return implode (DIRECTORY_SEPARATOR , [
16+ config ('view.paths ' )[0 ] ?? resource_path ('views ' ), $ path ,
17+ ]);
18+ }
19+ }
You can’t perform that action at this time.
0 commit comments