2

So in my SQL I have table that contains only three fields -- row id, person id and status id, and I want to add new rows using Laravel models, and when I use

$a = new AssignedStatus; $a->person_id = $person_id; $a->status_id = $status_id; $a->save(); 

I get SQL error telling that columns "created_at" and "updated_at" are not found in this table. Is it somehow possible to get rid of them and just insert row, or is it easier to use DB::table connection?

1 Answer 1

9

In AssignedStatus model you need to declare:

public $timestamps = false 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.