Skip to main content

The next step is to load the same "It works" but from the Blade file, and we will see how to register our View in the Service Provider.

First, we create the file itself:

packages/laraveldaily/laravel-permission-editor/resources/views/roles/index.blade.php:

It works from Blade!

Then, we need to register the views to be loaded from that location. Again, as in other configurations, it's done in a Service Provider...

The Full Lesson is Only for Premium Members

Want to access all of our courses? (29 h 46 min)

You also get:

55 courses
Premium tutorials
Access to repositories
Private Discord
Get Premium for $129/year or $29/month

Already a member? Login here

Comments & Discussion

K
kornelkornecki ✓ Link copied!

Why the directory resources/ is outside of the src/ directory? Is this because of any convention? or any other reason?

PK
Povilas Korop ✓ Link copied!

The same reason why resources/ folder is outside of the app/ directory in default Laravel project structure. Yes, it's Laravel convention.

K
kornelkornecki ✓ Link copied!

Got it! Thank you Povilas. Great course. I've just published my first Laravel package core45/system-settings-db

E
ev3rlost ✓ Link copied!

What would be the approach if the use case was Livewire (layouts, components) instead of the default Laravel blade views? I managed to make it semi-work (it does render the Livewire layout + the component) but after using wire:click to trigger a method I get "Unable to find component:" error.

SI
Solomon Iroegbu ✓ Link copied!

Is it compulsery to have the controllers also in app folder?

SI
Solomon Iroegbu ✓ Link copied!

And I get 404 while trying to view the pages. What should be the issue?

M
Modestas ✓ Link copied!

Hi,

Is it compulsery to have the controllers also in app folder?

What do you mean by this?

And I get 404 while trying to view the pages. What should be the issue?

Unregistered routes.

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.