src/Exceptions/ExceptionProyect.php
public function toArray()
    {
        return [
            'message' => $this->getMessageException(),
            'errors' => $this->getErrors(),
            'debugCode' => $this->getDebugCode(),
            'details' => $this->getDetails(),
            'routeBack' => redirect()->back()->getTargetUrl()
        ];
    }
public function toArray()
    {
        return [
            'message' => $this->getMessageException(),
            'errors' => $this->getErrors(),
            'debugCode' => $this->getDebugCode(),
            'details' => $this->getDetails(),
            'routeBack' => redirect()->back()->getTargetUrl()
        ];
    }
public function toArray ( ) { return [ 'message' => $ this -> getMessageException ( ) , 'errors' => $ this -> getErrors ( ) , 'debugCode' => $ this -> getDebugCode ( ) , 'details' => $ this -> getDetails ( ) , 'routeBack' => redirect ( ) -> back ( ) -> getTargetUrl ( ) ] ; }
convierte el Objeto en un array
@return array
convierte el Objeto en un array