I have this error : ErrorException in helpers.php line 748: preg_replace(): Parameter mismatch, pattern is a string while replacement is an array
SerialController.php
public function createSerial(Request $request)
{
$serial = new Serial();
$serial->nume_serial = $request['numeSerial'];
$serial->claritate = $request['claritate'];
$serial->aparitie = $request['aparitie'];
$serial->genuri = $request['genuri'];
$serial->save();
return redirect('/admin');
}
view
<div class="checkbox">
SF<input type="checkbox" name="genuri[1]" value="sf" id="">
Biografic<input type="checkbox" name="genuri[2]" value="biografic" id="">
Animat<input type="checkbox" name="genuri[3]" value="animat" id="">
</div>
helpers.phpdoes not have anypreg_replaceinside. Did you change something in the framework?helpers.phphas this line at 748$subject = preg_replace('/'.$search.'/', $value, $subject, 1);/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php? Really strange, cannot see any preg_replace/vendor/laravel/framework/src/Illuminate/Support/helpers.php