# What's New in Laravel - The PHP Framework For Web Artisans

By Dinesh Uprety
Published: 2024-02-18
Updated: 2024-02-19
Canonical: https://laranepal.com/blog/whats-new-in-laravel-the-php-framework-for-web-artisans

Let's discuss the most recent changes to the framework. I have some really awesome new features. Allow me to demonstrate.

**Base64 String Methods**

First we have two new methods for a string helper to `Str::toBase64()` and `Str::fromBase64()` and you guessed it already, it's about base64 encoding and decoding. We can now do it fluently through the string helper.

```php
<?php
use Illuminate\Support\Str;

$encoded = Str::toBase64('my-string');
$decoded = Str::fromBase64($string);
```

**Array Take**

Next we got a new method on the array helper. I'll show you.

```php
<?php
use Illuminate\Support\Arr;

$numbers = [1, 2, 3, 4, 5, 6];
return Arr::take($numbers, -3);
// [4,5,6]
```

**Collection Select**

Next we got a new method on Collection `select()`. I'll show you

```php
<?php
use Illuminate\Support\Collection;

$users = collect([
            [
                "name" => "Hari Uprety",
                "email" => "hari@gmail.com",
                "role" => "developer"
            ],
            [
                "name" => "Dinesh Uprety",
                "email" => "dinesh@gmail.com",
                "role" => "developer"
            ],
            [
                "name" => "Manohar Devkota",
                "email" => "manohar@gmail.com",
                "role" => "developer"
            ]
        ]);

 $users->select('name', 'email'); // only return selected keys value

	/*
        [
            [
                "name" => "Hari Uprety",
                "email" => "hari@gmail.com",
            ],
            [
                "name" => "Dinesh Uprety",
                "email" => "dinesh@gmail.com",
            ],
            [
                "name" => "Manohar Devkota",
                "email" => "manohar@gmail.com",
            ]
        ]
			*/	
```

