Sublime Text Snippets For LeanPub
Free collection of Sublime Text snippets for writing LeanPub books over at GitHub
Showing 10 of 2,055 results.
Free collection of Sublime Text snippets for writing LeanPub books over at GitHub
Option Result Original Order 0 1 2 3 4 5 6 7 8 9 10 11 12 SORT_REGULAR 7 6 3 1 0 5 2 11 10 9 4 8 12 SORT_LOCALE_STRING 7 6 3 1 0 5 2 11 10 9 4 8 12
The following code example demonstrates how to add messages to a MessageBag instance: 1 use Illuminate \ Support \ MessageBag ; 2 3 // Create a new MessageBag instance. 4 $ messageBag = new MessageBag ; 5 6 // Add new messages to the message bag....
…script enters into a function, the scope changes. This is still true for Closures and anonymous functions. That is why the above example is using the use keyword: to bring the $suspendedPeople variable from another scope into the current scope....
Where to Make AJAX Calls When integrating AJAX in your Meerkat comment's section, you typically will make AJAX calls from the MeerkatReply.submit method. The following examples will use jQuery, but you can use whatever methods you like. The...
The Document Parser provides a list of parsed nodes, or AST, to almost every other feature within the library. The following diagram gives a surface-level overview of how the library is structured: The document parser receives a Blade template as...
The first difference is in how the parser parses structures, such as a simple echo containing ambiguous characters: 1 {{ ' hello {{ world }} ' }} The previous example results in the following compiled output: 1 <?php 2 3 // Laravel Compiler Output...
The value function will return the default value of the supplied $value . Although this sounds redundant, if the supplied $value is an instance of the Closure class (an anonymous function), the function will be executed and the value will be...
The has helper method will return a boolean value that indicates if the given $key exists in the supplied $array , using dot notation. This method is incredibly useful when checking if an array has a specific key at an arbitrary depth.
If we look at the following code example, one might be tempted to say that the value of $message would be Hello, world! , but that would be incorrect: 1 $ testObject = new stdClass ; 2 $ testObject -> method = function ( ) { 3 return ' Hello,...