i have created package in laravel , not able include package between header , footer of page. please find code below,
$this->loadviewsfrom(__dir__.'\views','details');
how include package between header , footer section of website ? please me resolve issue.
the package have following structure show below
--root --packages --events --details --src --assets --models --request --views routes.php detailsserviceprovider.php detailscontroller.php composer.json
in service provider register view namespace using code:
$this->loadviewsfrom(__dir__.'\relative\path\from\service-provider','details');
now able load files using view('details::template-file')
path \relative\path\from\service-provider\template-file.blade
or including them in other blade files: @include('details::template-file')
Comments
Post a Comment