I created a very basic application in Laravel 4, which is what I will use repeatedly in different projects, so it makes sense to convert it to a package until I go too far, but I'm struggling to make changes to make it work, which, in my opinion, is largely explained by how to access various objects that are usually available in the application, for example View :: make
I had the following code working in the application:
class PageController extends BaseController { public function showPage($id) {
for the package, I have the following:
use Illuminate\Routing\Controllers\Controller; use Illuminate\Support\Facades\View; class PageController extends Controller { public function showPage($id) {
However, this does not load the blade template, which is located at:
workbench/packagenamespace/package/src/views/page/showPage.blade.php
and does not work:
return View::make('packagenamespace/package/src/page/showPage')
Also, I wonder what I did using the operators in which I use the facade object correctly, it seems to me that there should be an easier way to access things like the View object?
source share