<?php

namespace App;

use App\Traits\ApiResponser;
use Illuminate\Auth\Authenticatable;
use Laravel\Lumen\Auth\Authorizable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\DB;

class ContactoModel extends Model 
{
  use ApiResponser;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
protected $table='tiposDocumento';
    //protected $table = [
     //   'tipo','nombre', 'nom_corto',
    //];
    public function list_tipoDocuments(){
        try {
           $documents= DB::select('SP_LISTAR_TIPO_DOCUMENTOS()');
           return $this->SuccessResponse($documents);
        } catch (\Throwable $th) {
            return $this->ErrorResponse($th,Response::HTTP_INTERNAL_SERVER_ERROR);
        }
       
    }

}
