문제

Save to the database with the following code. Event refers to a custom model.

$currentEvent = new Event;

$currentEvent->end = $event['end_time'];

$currentEvent->save();

What's going on here - is the save method conflicting with something?

도움이 되었습니까?

해결책

Event is a kind of a reserved name in Laravel. You have two options:

1) Use a different one for your model.

2) Use namespaces.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top