kirschbaum-development / nova-comments

A commenting tool for Laravel Nova
MIT License
33 stars 36 forks source link

Got 404 if only use new Commenter() #58

Open rezabrnt opened 1 year ago

rezabrnt commented 1 year ago

Using the Commenter() without the CommentsPanel() will throw a 404 error.

mrvnklm commented 1 year ago

same here, workaround I use:

    /**
     * Get the fields displayed by the resource.
     *
     * @param  \Laravel\Nova\Http\Requests\NovaRequest  $request
     * @return array
     */
    public function fields(NovaRequest $request)
    {
        return [
            MorphMany::make(
                'Comments',
                'comments',
                \KirschbaumDevelopment\NovaComments\Nova\Comment::class
            )->onlyOnForms(),
            new Commenter(),
        ];
    }