public static function getLogDifference(Eloquent $model, Eloquent $oldModel) {
		$attributes = $model->attributesToArray();
		$modelAttributes = $oldModel->attributesToArray();

		$diff = array();

		// Determine what values are not the same
		foreach ($attributes as $key => $value) :
			$other = $modelAttributes[$key];

			if ($value !== $other) :
				$diff[] = $key;
			endif;
		endforeach;

		return $diff;
	}
public static function getLogDifference(Eloquent $model, Eloquent $oldModel) {
		$attributes = $model->attributesToArray();
		$modelAttributes = $oldModel->attributesToArray();

		$diff = array();

		// Determine what values are not the same
		foreach ($attributes as $key => $value) :
			$other = $modelAttributes[$key];

			if ($value !== $other) :
				$diff[] = $key;
			endif;
		endforeach;

		return $diff;
	}
public static function getLogDifference ( Eloquent $ model , Eloquent $ oldModel ) { $ attributes = $ model -> attributesToArray ( ) ; $ modelAttributes = $ oldModel -> attributesToArray ( ) ; $ diff = array ( ) ; // Determine what values are not the same foreach ( $ attributes as $ key => $ value ) : $ other = $ modelAttributes [ $ key ] ; if ( $ value !== $ other ) : $ diff [ ] = $ key ; endif ; endforeach ; return $ diff ; }
Determine the difference between this model and another
@param self $model
@return array Keys that are different
Determine the difference between this model and another