I am very new in Laravel and PHP and hope that somebody can help me.
I want to add this code:
<?php
$atts = array(
"id" => 3,
"post_id" => $actor['id'],
);
rating_form( $atts );
?>
to Laravel blade view and I'm get this exception:
Symfony \ Component \ Debug \ Exception \ FatalErrorException
Call to undefined function rating_form()
It's not a good way to include files in laravel. Change your composer file to load this file:
"autoload": {
"psr-4": {
...
},
"files": [
"rating-form/inc.php"
]
}
Then run composer dump-autload
.
try
php artisan queue:restart
the queue may have cached some of your source code (liek your helpers) and when you add new function, you need to restart the queue