You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to insert a table row/s dynamically through form by shortcodes functionality.
shortcode : [post id="1,2,3"]
I'm trying to insert table 'post' with id=['1', '2', '3'] rows with my form data.
I have created a new shortcode called InsertAddShortcode and and register it in boot method of ShortcodeServiceProvider.
I have made register method inside InsertAddShortcode.php
public function register($shortcode, $content, $compiler, $name, $viewData)
{
$query = $shortcode->table::find($shortcode->id);
return sprintf($shortcode->table=$query, $shortcode->id= $query->id, $shortcode->class, $content);
}
but it show error: Class name must be a valid object or a string.
I'm stuck in this process.
Any advice, solution would be highly appreciated.
Thanks in advance!!
The text was updated successfully, but these errors were encountered:
I'm trying to insert a table row/s dynamically through form by shortcodes functionality.
shortcode : [post id="1,2,3"]
I'm trying to insert table 'post' with id=['1', '2', '3'] rows with my form data.
I have created a new shortcode called InsertAddShortcode and and register it in boot method of ShortcodeServiceProvider.
I have made register method inside InsertAddShortcode.php
but it show error: Class name must be a valid object or a string.
I'm stuck in this process.
Any advice, solution would be highly appreciated.
Thanks in advance!!
The text was updated successfully, but these errors were encountered: