Laravel Arr wrap() function Example

In this tutorial you will learn about the Laravel Arr wrap() function Example and its application with practical example.

Laravel Arr wrap() function Example

In this article, I’ll show you how to use laravel Arr wrap() function with example. We will show example of Arr wrap() function in laravel. In this tutorial, we will use Arr wrap() function to  convert string variable to array.

Laravel Arr::wrap method

The Arr::wrap method converts or wraps the given value in an array format. If the given value is already an array format it will be returned without modification.

Example:-

Output:-

In this tutorial we have learn about the Laravel Arr wrap() function Example and its application with practical example. I hope you will like this tutorial.