Created
August 18, 2015 19:50
-
-
Save ferdiunal/bcf898260122cfaba828 to your computer and use it in GitHub Desktop.
Laravel View location change
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*** | |
* Move to resources/views/welcome.blade.php resources/views/default/welcome.blade.php | |
*/ | |
$theme = "default"; | |
// Admin Views | |
function admin_view($view, $data = [], $mergeData = []){ | |
\View::addNamespace("admin",base_path("resources/admin")); | |
return \View::make("layout"); | |
} | |
// Frontend | |
function view($view, $data = [], $mergeData = []){ | |
\View::addNamespace("theme",base_path("resources/views/" . $default)); | |
return \View::make("welcome"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment