Showing 7 of 1,216 result(s)
…s allowed to modify the current element within the collection. We could leverage the times method to quickly produce a collection instance containing Carbon date instances for the next four days like so: We could also rewrite the above example...
Create a new file named PrettyPaginator.php somewhere where Laravel and Composer can find it. For this tutorial, I will just be declaring it in the global namespace. Also, make sure to import (or use ) Laravel's Paginator class: That's the start...
…ception will be thrown. The rounds option is synonymous with the cost option when using PHP's password_hash or crypt functions. Increasing the rounds will also increase the time required to compute the hash. The default value for this option is...
…ode example, the $className variable would contain the value "Illuminate\Auth\AuthManager". This method of determining a facade's underlying class can be expanded on to create a function that will list every facade's underlying class for the...
Laravel's translation components allow for a simple way to express ranges of numbers when defining language files; we've seen many of the ways to do this in previous sections. However, we will explore them again in this section.
Assuming the following example files are available: In app/Http/Controllers/ExampleController.php : In routes/web.php : Calling the action helper function like so: would return the following URL: http://laravel.artisan/sayHello/Jim The exact URL...
First, we are going to write a SemanticPresenter class. This class is what Laravel 4 will use when constructing the links for the pagination elements. So let's start it. Create a new file named SemanticPresenter.php somewhere where composer and...
The following amazing people help support this site and my open source projects ♥️
If you're interesting in supporting my work and want to show up on this list, check out my GitHub Sponsors Profile.