public function track(Exception $exception)
    {
        return $this->getModel()->newQuery()->firstOrCreate([
            'code'    => $this->getCode($exception),
            'message' => $exception->getMessage(),
        ])->getKey();
    }
public function track(Exception $exception)
    {
        return $this->getModel()->newQuery()->firstOrCreate([
            'code'    => $this->getCode($exception),
            'message' => $exception->getMessage(),
        ])->getKey();
    }
public function track ( Exception $ exception ) { return $ this -> getModel ( ) -> newQuery ( ) -> firstOrCreate ( [ 'code' => $ this -> getCode ( $ exception ) , 'message' => $ exception -> getMessage ( ) , ] ) -> getKey ( ) ; }
Track the exception error.

@param  \Exception  $exception

@return int
Track the exception error .