'How to load view file from another root directory in Laravel 5.8
I want to load view file from another root directory.
Example :
public function getProducts(Request $request)
{
return view(http://localhost/laravelApp/view/products, $data);
}
http://localhost/laravel/view this is my another view file directory and 'products' is view file name and my laravel project directory is laravelApp. My laravel version 5.8
Solution 1:[1]
you can use {{url('../other-project-name/view/my-view')}}
or return view(url('../other-project-name/view/my-view')); in your case
Edit: This my help you to debug sometimes : https://laravel.com/docs/9.x/collections#method-dd
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Matthias B. |
