Search

Showing 7 of 1,216 result(s)

/blog/2023/09/04/implementing-a-custom-blade-precompiler-for-laravel-volt-and-livewire#content-getting-started-setting-up-our-blade-precompiler

Starting with a fresh Laravel application, we need to install two new dependencies. The first will be Volt, which will also add Livewire to our project for us: composer require livewire/volt The second dependency we will use is a Blade parser...

/blog/2014/07/28/laravel-paginator-pretty-urls#content-the-goal

When use the paginator in Laravel, we get URLs like this: http://localhost:8000/users?page=1 and we want URLs like this http://localhost:8000/users/page/1 because why not? When digging through the code for the paginator class, I found that the...

/blog/2014/07/28/laravel-paginator-pretty-urls#content-using-the-prettypaginator

…ttyPaginator class written, we actually need to use it. This will involve some more work, but its pretty simple. Here are the things we will need to do: Create a new Route for our pagination URL,, Create a function that uses our new paginator,,...

/blog/2016/12/01/laravel-artisan-command-input-and-command-signatures#content-array-options

…ltiple values allowed) . A command with a signature similar to the above example could be executed like so: When the command above is issued, the firstName value would be John , the lastName value would be Doe and the array of websites would...

/blog/2017/11/27/laravel-55-string-helper-function-studly#content-example-use

Let's take a look at a few examples to see how this would format a few example strings. The string returned will appear above the function call as a comment. In fact, all of the function calls below will return the string MyWords : Pascal Case...

/blog/2018/04/21/laravel-5-facades#content-creating-facades

…be bound as a singleton). The important part is that we have an service container binding: math which will resolve to an instance of Calculator . It is at this point a facade can be created. A facade is created by creating a new class and...

/blog/2018/04/22/laravel-5-collections-calculating-the-sum-of-a-collection-with-sum#content-using-sum-with-higher-order-messages

…tion will now contain Conference object instances instead of our previous arrays. Our particular implementation of Conference exposes a method numberOfSpeakers which simply returns the number of speakers at that particular conference instance....