Forum

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

New Discussion

Createing New Module and Adding to Navbar

BARIS METIN   ( User )

Commented 6 years ago

Hi, I have a problem with adding my module to the navbar. I already check the documentation but still not sure how to do it. Is anyone teach me (I will pay for effort)? Thank you 

Marco Bridge   ( User )

Commented 6 years ago

Have you checked the following?


https://akaunting.com/docs/developer-manual/menu

BARIS METIN   ( User )

Commented 6 years ago

 Yes I did I just stuck in handler and listener part.


hen add your handler/listener into the boot method of your service provider:


$this->app['events']->listen(AdminMenuCreated::class, BlogAdminMenu::class);

Do you know where should I insert this line code? 

BARIS METIN   ( User )

Commented 6 years ago

After all steps I completed. The module comes to update section but it is not coming to navbar? . And it doesn't update successfully

Zheng Hao Seow   ( User )

Commented 6 years ago

That line of code should be placed in the boot function of your module's service provider.


The folder structure should be:


Modules\Module Name\Providers\Name of Provider


 <code>


    public function boot()


    {


        $this->registerTranslations();


        $this->registerConfig();


        $this->registerViews();


        $this->registerFactories();


        //handle database migration if your module require new tables to be created


        //remove if you  do not need any migration


        $this->loadMigrationsFrom(__DIR__ . '/../Database/Migrations');


        //handle menu creation on boot


 


        $this->app['events']->listen(AdminMenuCreated::class, BlogAdminMenu::class);


}


</code>


 

Steffen   ( User )

Commented 6 years ago

Hey guys,


i got the same problem. I followed the whole developers manual on the pages module and menu but I can not do manage to get my module in the navbar. By the way I get the red noification point at updates too, but if I click to update the module I only get "Update process has failed, please, try again.".


Do I have to update the module or something else? I cleared the cache several time because I read that somewhere but it doesn't work. Iam a bit helpless..


Regards Steffen


 

Ronald Patiño   ( User )

Commented 6 years ago

in the file namespace App\Utilities\Updater, around:


public static function update($alias, $version)


    {


        // Download file


        if (!$data = static::download($alias, $version)) {


            return false;


        }


it tries to download a file containing your module and since it is not found it will return false triggering the "Update process has failed, please, try again." message. 


That said I have also followed https://akaunting.com/docs/developer-manual/menu and the the new module item doesn't show  in the menu


 


 

Ronald Patiño   ( User )

Commented 6 years ago

BTW I am using tags/1.2.16

Murad Alwan   ( User )

Commented 6 years ago

any update to this issue

Please login or register to leave a response.

Showing 1 to 9 of 9 discussions