I have a small problem in producing a registration system, everything is working fine, but when I check in the database no data submitted in the form appears, ie it is not registered.
Controller Class:
public function Submit(Request $request)
{
Model::create($request ->all());
return redirect()->action('MainController@index');
}
Note: I do not go for View
because it's too big ( has 150 lines of code, just the form, but if necessary I'll put it. )
Your respective model:
class Model extends Model
{
protected $table = 'user';
public $timestamps = false;
protected $fillable = array('nome',
'CPF',
'email',
'datnasc',
'naturalidade',
'turno',
'uf_natural',
'nome_mae',
'nome_pai',
'nome_resp',
'cpf_resp',
'rua',
'numero',
'bairro',
'complemento',
'cep',
'didade',
'estado',
'tel_celular',
'tel_fixo',
'tipo_escola',
'escola_origem',
'serie');
protected $guarded = ['id'];
}
How to solve this problem?