PHP code example of artisan-toolbox / core
1. Go to this page and download the library: Download artisan-toolbox/core library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
artisan-toolbox / core example snippets
use Illuminate\Support\Arr;
use function ArtisanToolbox\Core\sift_when;
$payload = Arr::sift([
'name' => $user->name,
'email' => sift_when($canViewEmail, fn (): string => $user->email),
]);