I have a package in my Laravel project that has a view of it's own. I need to include that view in the main view of my project. My package is named as Tkabir\Somepackage. In my project's config/app.php, I have included the service provider for the package as
'providers' => [
* Package Service Providers...
'aliases' => [
'Somepackage' => Tkabir\Somepackage\Facade\Somepackage::class,
ErrorException in FileViewFinder.php line 112:
No hint path defined for [Somepackage]. (View: E:\xampp\htdocs\laravel->projects\test_package\resources\views\welcome.blade.php)
@include includes a view. You're calling in a method for a class.
You're including configurations correctly with
$this->publishes([ .'/Config/somepackage.php' => config_path('somepackage.php'), ], 'config');
You need to do the same thing for your views in your service provider's
boot() method for views: https://laravel.com/docs/5.3/packages#views | Header: Publishing Views
You also need to run
php artisan vendor:publish just as you would for configurations, and include your view in with
Take a look at the link I gave for full documentation on building packages in Laravel