Skip to content

I'm not able to get controller to work #169

@bojo02

Description

@bojo02

Hello, i'm trying to understand how the controller works.

Here is my code:
themes/demo/navbar/controller.php

<?php

namespace Vendor\Hansschouten\LaravelPagebuilder\Themes\Demo\Blocks\Navbar;

use PHPageBuilder\Modules\GrapesJS\Block\BaseController;

class Controller extends BaseController
{
    /**
     * Handle the current request.
     */
    public function handleRequest()
    {
        return 'asdf';
    }
}

When i open the page builder, it's showing this error:

Class "Vendor\Hansschouten\LaravelPagebuilder\Src\..\Themes\Demo\Blocks\Navbar\Controller" not found

Once i delete the controller.php file, the page builder is working fine, once i create it the error pops up.

Any idea what i'm missing?

PS. - I'm using Laravel 9.52.18

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions