Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

View not found error when using using layouts within module

Ameed Aabidi   ( User )

Commented 2 years ago

Hi
Have been slowly learning developing apps in akaunting and has been a rough journey so far. In my "Module/Resources/views/index.blade.php" file I have an extend blade directive like so:
@extends('layouts.base')
The reason I have this is because I have a custom view for my app (which is quite different from the default one from akaunting). I have the file "base.blade.php" in the "Module/Resources/views/layouts" directory, but it's giving me a "View not found" error. Further, when I reference views from the base "Resources/views" folder, it is loading them easily without any errors.
Problem seems to be that all references to blade files in the blade directives are somewhat directed to the "Project/Resources/views" directory instead of "Project/Modules/Resources/views". Any solution to this?

Ameed Aabidi   ( User )

Commented 2 years ago

Finally got it figured out!

Need to use:
@extends('module::layouts.base')
Where module is, replace with your module. The developers really need to add this to their documentation honestly.

Veev   ( User )

Commented 2 years ago

Hi, Ameed
i hope you doing good.
is your module done ?

Please login or register to leave a response.

Showing 1 to 3 of 3 discussions