Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing required parameter #83

Open
ltib91 opened this issue Feb 27, 2024 · 2 comments
Open

Missing required parameter #83

ltib91 opened this issue Feb 27, 2024 · 2 comments

Comments

@ltib91
Copy link

ltib91 commented Feb 27, 2024

Hi,

I am getting this error, doing everything like in the readme instructions.

Illuminate\Routing\Exceptions\UrlGenerationException
Missing required parameter for [Route: laravel-grapesjs.model.templates] [URI: laravel-grapesjs/{model}/{editable}/templates] [Missing parameter: editable].
screencapture-localhost-8888-admin-products-3-editor-2024-02-27-14_39_59

@ap1969
Copy link

ap1969 commented Feb 29, 2024

I get the same problem. Any luck resolving it?

@ltib91
Copy link
Author

ltib91 commented Feb 29, 2024

@ap1969 I used for Product, here is my working solution:

Product Controller:

protected function setupEditorRoutes($segment, $routeName, $controller) {
    Route::get($segment.'/{id}/editor', [
        'as'        => $routeName.'.editor',
        'uses'      => $controller.'@editor',
        'operation' => 'editor',
    ]);
}

public function editor(Request $request) {
    $product = Product::find($request->id);
    return $this->show_gjs_editor($request, $product);
}

Product Model:

public function getKeyValue(){
    return $this->id;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants