public function keep($priority = null)
    {
        if (!$this->validate()) {
            return;
        }
        $insert   = array_merge($this->prepare(), $this->getObjectParams($priority));
        $logs     = new Logs($insert);
        $logs->save();
        $segments = request()->segments();
        if (end($segments) == 'login') {
            try {
                $location = $this->app->make('geoip')->getLocation();
            } catch (Exception $ex) {
                $location = 'not reached';
            }
            $this->loginDeviceAdapter->validate(array_merge($insert, ['log_id' => $logs->id, 'location' => $location]));
        }

        return true;
    }
public function keep($priority = null)
    {
        if (!$this->validate()) {
            return;
        }
        $insert   = array_merge($this->prepare(), $this->getObjectParams($priority));
        $logs     = new Logs($insert);
        $logs->save();
        $segments = request()->segments();
        if (end($segments) == 'login') {
            try {
                $location = $this->app->make('geoip')->getLocation();
            } catch (Exception $ex) {
                $location = 'not reached';
            }
            $this->loginDeviceAdapter->validate(array_merge($insert, ['log_id' => $logs->id, 'location' => $location]));
        }

        return true;
    }
public function keep ( $ priority = null ) { if ( ! $ this -> validate ( ) ) { return ; } $ insert = array_merge ( $ this -> prepare ( ) , $ this -> getObjectParams ( $ priority ) ) ; $ logs = new Logs ( $ insert ) ; $ logs -> save ( ) ; $ segments = request ( ) -> segments ( ) ; if ( end ( $ segments ) == 'login' ) { try { $ location = $ this -> app -> make ( 'geoip' ) -> getLocation ( ) ; } catch ( Exception $ ex ) { $ location = 'not reached' ; } $ this -> loginDeviceAdapter -> validate ( array_merge ( $ insert , [ 'log_id' => $ logs -> id , 'location' => $ location ] ) ) ; } return true ; }
insert customized log data

@param Strong $priority
@return boolean
insert customized log data