PHP code example of betterde / response

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

    

betterde / response example snippets


return stored($data, $message = '创建成功');


return updated($data, $message = '更新成功');


return success($data);


return respond($data = [], $message = '请求成功', array $header = []);