PHP code example of askync / utils

1. Go to this page and download the library: Download askync/utils 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/ */

    

askync / utils example snippets


return \Askync\Utils\Facades\AskyncResponse::success([
    'name' => 'John Doe',
    'email' => '[email protected]'
]);

return \Askync\Utils\Facades\AskyncResponse::success(401, 'Unauthorized');

    throw new \Askync\Utils\Utils\ResponseException('Server cannot accept the data type');

    ...
    $app->singleton(
        Illuminate\Contracts\Debug\ExceptionHandler::class,
        \Askync\Utils\Handler\LumenErrorHandler::class
    );

    ...

    $app->register(\Askync\Utils\UtilsServiceProvider::class);
    ...