File: /home/imensosw/www/ezwork/app/Http/Controllers/AddressProofTypeController.php
<?php
/**
* AddressProofTypeController class file
*
* PHP Version 7.2
*
* @category Controller
* @package Ez
* @author Imenso Software <admin@imensosoftware.com>
* @license http://imensosoftware/license.php GNU Public License
* @link http://imensosoftware.com/recipes
*/
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\AddressProofType;
/**
* AddressProofTypeController class
*
* The class manage the Address Proof Type
*
* @category AddressProofTypeController
* @package Ez
* @author Imenso Software <admin@imensosoftware.com>
* @license http://imensosoftware/license.php GNU Public License
* @link http://imensosoftware.com/recipes
*/
class AddressProofTypeController extends Controller
{
/**
* GetAddressProofTypes function get the list of address proof types
* from the storage and return it in json format.
*
* @param void
* @return json
*/
public function getAddressProofTypes(): \Illuminate\Http\JsonResponse
{
$addressProofTypes = AddressProofType::get();
return response()->json(
[
'status' => 'success',
'addressProofTypes' => $addressProofTypes->toArray(),
],
200
);
}
}