* @throws \InvalidArgumentException
*/
public function getEngineFromPath($path)
{
if (! $extension = $this->getExtension($path)) {
throw new InvalidArgumentException("Unrecognized extension in file: {$path}.");
}
$engine = $this->extensions[$extension];
return $this->engines->resolve($engine);
* @param \Illuminate\Contracts\Support\Arrayable|array $data
* @return \Illuminate\Contracts\View\View
*/
protected function viewInstance($view, $path, $data)
{
return new View($this, $this->getEngineFromPath($path), $view, $path, $data);
}
/**
* Determine if a given view exists.
*
*/
public function file($path, $data = [], $mergeData = [])
{
$data = array_merge($mergeData, $this->parseData($data));
return tap($this->viewInstance($path, $path, $data), function ($view) {
$this->callCreator($view);
});
}
/**
return $factory;
}
return $factory->exists($view)
? $factory->make($view, $data, $mergeData)
: $factory->file($view, $data, $mergeData);
}
/**
* @deprecated
}
if (! function_exists('view')) {
function view()
{
return Roots\view(...func_get_args());
}
}
<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<?php do_action('get_header'); ?>
<div id="app">
<?php echo view(app('sage.view'), app('sage.data'))->render(); ?>
</div>
<?php do_action('get_footer'); ?>
<?php wp_footer(); ?>
</body>
*
* @param string $template The path of the template to include.
*/
$template = apply_filters( 'template_include', $template );
if ( $template ) {
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
InvalidArgumentException
|
---|
InvalidArgumentException: Unrecognized extension in file: /home/megawea1/public_html. at /home/megawea1/public_html/wp-content/themes/megaweapon/vendor/illuminate/view/Factory.php:305 at Illuminate\View\Factory->getEngineFromPath('/home/megawea1/public_html') (/home/megawea1/public_html/wp-content/themes/megaweapon/vendor/illuminate/view/Factory.php:274) at Illuminate\View\Factory->viewInstance('/home/megawea1/public_html', '/home/megawea1/public_html', array()) (/home/megawea1/public_html/wp-content/themes/megaweapon/vendor/illuminate/view/Factory.php:122) at Illuminate\View\Factory->file('/home/megawea1/public_html', array(), array()) (/home/megawea1/public_html/wp-content/themes/megaweapon/vendor/roots/acorn/src/Roots/helpers.php:99) at Roots\view('/home/megawea1/public_html', array()) (/home/megawea1/public_html/wp-content/themes/megaweapon/vendor/roots/acorn/src/Roots/globals.php:13) at view('/home/megawea1/public_html', array()) (/home/megawea1/public_html/wp-content/themes/megaweapon/index.php:14) at include('/home/megawea1/public_html/wp-content/themes/megaweapon/index.php') (/home/megawea1/public_html/wp-includes/template-loader.php:106) at require_once('/home/megawea1/public_html/wp-includes/template-loader.php') (/home/megawea1/public_html/wp-blog-header.php:19) at require('/home/megawea1/public_html/wp-blog-header.php') (/home/megawea1/public_html/index.php:17) |