class Answer extends Model
{
protected $fillable = [
'name',
'a',
'b',
'c',
];
protected $casts = [
'answer' => 'array',
];
}
//Формируем базу, кодируем в json ответы
Answer::create([
'name' => $request->name,
'answer' => json_encode($answers),
'a' => $answer_a,
'b' => $answer_b,
'c' => $answer_c,
]);
foreach ($w as $login) {
if($_POST['login'] == $login['login']){
?>
<script type="text/javascript">
document.location.href="panel.php/lk?id=<?echo $user['id']?>";
</script>
<?php
}else{
echo "logina net";
}
}
foreach ($w as $login) {
if($_POST['login'] == $login['login'])
?>
<script type="text/javascript">
document.location.href="panel.php/lk?id=<?echo $user['id']?>";
</script>
<?php
}