1. Go to this page and download the library: Download axn/tool-kit-for-laravel 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/ */
axn / tool-kit-for-laravel example snippets
return app_env_enum();
// enum AppEnv
echo app_env_name();
// 'prod', 'preprod', 'test', 'local' or 'unknown'
/**
* Create a Carbon instance from a date string, a DateTime instance or a timestamp.
*
* @param \DateTime|int|string|null $date
* @param string|null $fromFormat
* @param \DateTimeZone|string|null $tz
* @return \Illuminate\Support\Carbon
* */
function carbon($date = null, $fromFormat = null, $tz = null)
use Axn\ToolKit\Enums\AppEnv;
$date = Carbon::now();
$date = Carbon::now('Europe/Paris');
$date = Carbon::createFromFormat('Y-m-d H:i', '2018-06-18 09:30');
$date = Carbon::createFromFormat('Y-m-d H:i', '2018-06-18 09:30', 'Europe/Paris');
$date = new Carbon('Thursday, June 18 2015 9:30:00');
$date = new Carbon('Thursday, June 18 2015 9:30:00', 'Europe/Paris');
$date = Carbon::createFromTimestamp(1434619800)