PHP code example of fernandozueet / response-laravel

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

    

fernandozueet / response-laravel example snippets


return respond_empty();

return respond_success('Record changed successfully.');

//or 

//create translation file
return respond_success('filex.record_success');

return respond_success('Record changed successfully', [ 'type' => 1 ]);

return respond_created('Record created successfully.');

return respond_created('Record created successfully.', [ 'type' => 1 ]);

return respond_error('Error while changing registry.');

return respond_error('Error while changing registry.', [ 'type' => 1 ]);

return respond_unauthorized();