Two Masters?

Google started out as the organizer of the worlds information. They still do that, but since becoming a public company the focus is more and more directed toward being the worlds marketer. Can the…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




10 Eloquent Features That You Might Not Know About

With all the features that are out-of-the-box available in Laravel it is hard to know them all. Some features are not even properly documented. In this article I will be giving you ten Eloquent features that you might not know about.

The exists property tells whether the object exists in the database or not. When you create a new model instance the exists property will be set to false. Once your model is saved or retrieved from the database the exists property will be set to true.

To check if a model has been edited since it was retrieved from the database you can use the isDirty method. It is good to know that when a model isn’t saved at all the isDirty method will return true. This method has an optional parameter that makes it able to check if a specific property is dirty.

You can use the getDirty method to get an array of all the propterties that are dirty on a model instance.

Getting a model’s original attribute values can be done by using the getOriginal method. This method has an optional parameter that makes it able…

Add a comment

Related posts:

Issue what?

About Ich bin issue. “Issue what?” is published by Ich bin Issue.

Casamento

voltei a fumar. e foi assim que consegui começar a te esquecer. voltei a fumar. mas agora é só chá e desapego a cada tragada que entra e a cada fumaça que vai. não tem tabaco. mas sei que você não…

Immigrazione non sostenibile

In questi giorni imperversa lo sbarco di migliaia di clandestini sulle coste dell’Italia, la situazione di sta complicando e molto preoccupante. Il fatto è che ancora non si riesce a identificare il…