Have you seen this lovely error while working in Laravel?
Method Illuminate\\View\\View::__toString() must not throw an exception
I have s
I encountered error like this when an object in my case $expression = new Expression(); is the same as the parameter variable submitExpression($intent, $bot_id, **$expression**){ check below code for more details.
private function submitExpression($b_id, $expression){
$expression = new Expression();
$expression->b_id = $b_id;
$expression->expression = $expression;
$expression->save();
}
so I changed the above code to something like
private function submitExpression($b_id, $statement){
$expression = new Expression();
$expression->b_id = $b_id;
$expression->expression = $statement;
$expression->save();
}
and everything was working fine, hope you find this helpful.