Search

Showing 7 of 1,216 result(s)

/blog/2018/04/21/laravel-5-macros-framework-classes-with-dynamic-methods-available

The following table will list every framework class or trait that implements the __call method directly. The table will also indicate if the class or trait supports macros even though it implements __call . Please note that the following table...

/blog/2018/04/21/laravel-5-message-bags-adding-messages-to-the-message-bag-with-add

The add method adds a new message to the MessageBag instance. The message is identified by a given $key and contains the value $message . The add method returns a reference to the current MessageBag instance.

/blog/2018/04/21/laravel-5-message-bags-checking-if-messages-exist-for-a-specific-input-key-with-has

The has method can be used to determine if messages exist within the MessageBag instance for a given $key . The has method returns true if messages exist for the given $key , and returns false if no messages exist.The signature of the has method...

/blog/2018/04/21/laravel-5-message-bags-checking-if-there-are-any-messages-with-isempty

The isEmpty method is the logical opposite of the any method. It returns a boolean value indicating if the message bag is empty (having no messages). It returns true if the message bag is empty; it returns false if the message bag contains...

/blog/2018/04/21/laravel-5-message-bags-checking-if-there-are-any-messages-with-isnotempty

The isNotEmpty method returns a boolean value indicating if the MessageBag instance actually has any messages. The method returns true if the instance has messages, otherwise it returns false . The isNotEmpty method is an alias of the any...

/blog/2018/04/21/laravel-5-message-bags-converting-a-message-bag-to-a-string-with-__tostring

When a MessageBag instance is cast into a string, its JSON representation is returned as the result. Internally this is accomplished by returning the result of the toJson method.The signature of the __toString magic method is: public function...

/blog/2018/04/21/laravel-5-message-bags-converting-the-message-bag-to-an-array-with-toarray

The toArray method can be used to retrieve the MessageBag instance as an array. It internally accomplishes this by returning a call to the getMessages method.The signature of the toArray method is: public function toArray();The following example...