Insert data when table not having created_at and updated_at column in Laravel Project

 

I have created a table not having created_at and updated_at column,
On submit form to store data into database table it is showing unknown column created_at and updated_at.
How to submit into database table without having these two column


Answer
 

You either have to declare public $timestamps = false; in every model, or create a BaseModel, define it there, and have all your models extend it instead of eloquent.

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class ModalName extends Model
{
    protected $table = 'table_name';
    public $timestamps = false;
}